History log of /system/extras/ext4_utils/allocate.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
213735b3442641517af011f4caca9eff4f892562 19-Nov-2016 Dmitry Shmidt <dimitrysh@google.com> Merge "ext4_utils: Remove signed/unsigned comparison warnings" am: 2417cf79ce am: efd86cef98 am: 920aae83f3
am: 43417e6c8e

Change-Id: I6a7badcc5130ba62c2332747da19b7f23b4affed
cd205307320b4da5dd7899f79b83539c620ae1d1 19-Nov-2016 Dmitry Shmidt <dimitrysh@google.com> ext4_utils: Remove signed/unsigned comparison warnings

Bug: 33012393
Test: Manual

Change-Id: I18e442cb27f28be491b0ef6f620ba4fa0fad6713
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
/system/extras/ext4_utils/allocate.c
06ca811e9297e28f43d65f30493df88862ff09c1 05-Oct-2016 Tao Bao <tbao@google.com> ext4_utils: Export headers for libext4_utils* libs.

So we can do "#include <ext4_utils/make_ext4fs.h>" without adding
"LOCAL_C_INCLUDES += system/extras/ext4_utils".

Also clean up the #include lines in system/extras/ext4_utils/.

Test: `m checkbuild` works.

Change-Id: I3c8b07c9b6f5996160e0cb6d9d069579b1609f60
(cherry picked from commit 018ef1be61e749d0fbe0f05179a4f0f9b858ae57)
/system/extras/ext4_utils/allocate.c
018ef1be61e749d0fbe0f05179a4f0f9b858ae57 05-Oct-2016 Tao Bao <tbao@google.com> ext4_utils: Export headers for libext4_utils* libs.

So we can do "#include <ext4_utils/make_ext4fs.h>" without adding
"LOCAL_C_INCLUDES += system/extras/ext4_utils".

Also clean up the #include lines in system/extras/ext4_utils/.

Test: `m checkbuild` works.

Change-Id: I3c8b07c9b6f5996160e0cb6d9d069579b1609f60
/system/extras/ext4_utils/allocate.c
beaf4f75a51110022d528f2a2b392c458b4c5fc4 30-Sep-2016 Colin Cross <ccross@android.com> Merge "Revert "ext4_utils: -Werror"" am: 3e3353e88f am: 884bf31b61 am: 2108b3a373
am: 5b55849786

Change-Id: Ib5e5191c8a2f5a2e8397e56203d942933bfc7327
afb52975c3b60b32cf08a3ab270400defccd81f6 30-Sep-2016 Colin Cross <ccross@android.com> Revert "ext4_utils: -Werror"

This reverts commit f55303f4a4a4319e90e671b50a4dcdd131781f35.

Change-Id: I63b6c158536871534cfee9b3fbe416f121d7b75a
/system/extras/ext4_utils/allocate.c
21cf0d1cc2a5db9d492e11af7c78334c58673c99 30-Sep-2016 Mark Salyzyn <salyzyn@google.com> ext4_utils: -Werror am: f55303f4a4 am: 6379b757ca am: ab0fd7c9c0
am: 660a60dcc3

Change-Id: I62afe38fae8d7ab1ee0c309e402f49616f6463b6
f55303f4a4a4319e90e671b50a4dcdd131781f35 13-May-2016 Mark Salyzyn <salyzyn@google.com> ext4_utils: -Werror

Correct a few compiler warnings

Test: build success
Bug: 26552300
Bug: 31289077
Change-Id: I52e6143df465c02b94fe89c80b1712706da1ab7c
/system/extras/ext4_utils/allocate.c
be25a224b45a0c3d1fecd3b09e74aa2741f19b71 07-Sep-2016 Mohamad Ayyash <mkayyash@google.com> Fix incorrect loop condition

Change-Id: I76e07299eda9b7217594f94996e8d8d6fd1f679b
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/system/extras/ext4_utils/allocate.c
62b5fa4a8b71b99f5a9f33cf4ec1949e30c13060 02-Sep-2016 Mohamad Ayyash <mkayyash@google.com> BUG: Reclaim chunk blocks when freeing block allocations

Otherwise we can end up with extra block sized holes between some files

Change-Id: Ib008734c4db9d0c232886d45ee96ef9320c46ed7
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/system/extras/ext4_utils/allocate.c
f7124d6c955c0453361b0ff47c5c94619e68087f 29-Apr-2016 Mohamad Ayyash <mkayyash@google.com> Incr Ext4: Properly merge block_allocation lists

BUG: 27698960
Change-Id: Ia31b8319e0d1c8644ae1798116007a4b35c39e9b
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/system/extras/ext4_utils/allocate.c
dedf8f9705df13e1fd07d3f754216d34725bb269 15-Apr-2016 Mohamad Ayyash <mkayyash@google.com> make_ext4fs: Modify ext4 filesystem setup to speed up fsck

1) Set EXT4_BG_INODE_UNINIT so fsck will skip scanning unused inodes
2) Use EXT4_FEATURE_RO_COMPAT_GDT_CSUM to enable group descriptor
checksums in filesystem which reduces overhead for fsck

BUG: 24747200
BUG: 28013112
Change-Id: I118ab26935442f452962b3a7c29c61acf76ad4d9
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/system/extras/ext4_utils/allocate.c
a6866eb4c6b88403683ac7e00a517820d2e1e810 03-Mar-2016 Mohamad Ayyash <mkayyash@google.com> make_ext4_fs: Clean up a few error messages

Change-Id: I269859a2c6beefb154fd483a02b29649416d60f9
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/system/extras/ext4_utils/allocate.c
9579198cd7d5b88b3508f1b00ddd77bd8da60682 20-Feb-2016 Mohamad Ayyash <mkayyash@google.com> Redesign make_ext4fs to incrementally generate ext4 images

Allows passing a base fs mapping file through -d which preserves the
location of those mapping in existing files

Internal Design Doc: go/incremental-ext4
BUG: 26839493
Change-Id: I05e296693429d39466d257d1d0a3daf00510dc26
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/system/extras/ext4_utils/allocate.c
18785a86a30135ac65b88db9886bfc22d6608849 19-Feb-2016 Mohamad Ayyash <mkayyash@google.com> Revert "Redesign make_ext4fs to incrementally generate ext4 images"

This reverts commit 3d960843a2260a98c8df5cc39ca0dbf3d675f1a2.

Change-Id: I0fb7d65f094feb4013924685270fc847693b6889
/system/extras/ext4_utils/allocate.c
3d960843a2260a98c8df5cc39ca0dbf3d675f1a2 13-Feb-2016 Mohamad Ayyash <mkayyash@google.com> Redesign make_ext4fs to incrementally generate ext4 images

Allows passing a blk mapping file through -Z which preserves the
location of those mapping in existing files

Internal Design Doc: go/incremental-ext4
BUG: 26839493
Change-Id: I447873bf65ae66dab9923e5a11c497f0722750df
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/system/extras/ext4_utils/allocate.c
468e7007b1151915a14800cf9d55a5f6f3644de3 09-Sep-2015 Theodore Ts'o <tytso@google.com> make_ext4fs: Don't set EXT4_BG_INODE_UNINIT for now

Since we aren't setting the EXT4_FEATURE_RO_COMPAT_GDT_CSUM flag due to
commit eee96f654e7a3, we also must not set the EXT4_BG_INODE_UNINIT
flag.

Bug: 23786458
Change-Id: I2ad3196156013426c96f48d4675819cd4f1b5711
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/system/extras/ext4_utils/allocate.c
bec598e982301bf2714d37b14e312c9845c7cc0c 12-Aug-2014 Doug Zongker <dougz@google.com> add option to make_ext4fs to record blocks for each file

Add the -B option to make_ext4fs, which causes it to record the block
ranges used for each (regular) file in the image. We can use this
information to construct more efficient block-based incremental OTAs.

Bug: 16984795
Change-Id: I2a5325bb89948f63c76e93fdfa84c51f9b050104
/system/extras/ext4_utils/allocate.c
eb3915a5eb76c687fd74773f3896a939d0bf5211 21-Jan-2014 Colin Cross <ccross@android.com> make_ext4fs: fix block allocation to be best-fit

The block allocation algorithm was failing to allocate parts of large
files out of partially filled block groups. Update the allocation
algorithm to be a simpler best fit loop - if the remaining length to
allocate is larger than any single contiguous region, allocate the
largest single contiguous region and continue allocating, otherwise
allocate the smallest contiguous that can hold the length.

Change-Id: Idcc60df91ed0a266d3128ea46e86408a581d3f40
/system/extras/ext4_utils/allocate.c
782879ab61fe825835a9c6a701f91aa7d305acef 23-Jan-2014 Colin Cross <ccross@android.com> ext4_utils: move sparse file pointer out of fs_info

Move the sparse file pointer out of the fs_info struct in
preparation for exporting fs_info without sparse file support.

Change-Id: I5a72147fe4fb24296e615cb82dbba91c6dc6f7f0
/system/extras/ext4_utils/allocate.c
7900c773815d062deb266f744f95aa76b3573fa3 23-Jan-2014 Colin Cross <ccross@android.com> ext4_utils: refactor kernel headers

Move the kernel header includes into a single include file that
can deal with getting the kernel int types correct on all
platforms.

Change-Id: Ied3dc6a0f5cbb3ceb686aa3de72f16e10a36462a
/system/extras/ext4_utils/allocate.c
17de65420dbc114001896d243fbb27cc3ba6bf61 16-Aug-2013 Ken Sumrall <ksumrall@android.com> Avoid underflow on an unsigned int when computering bg overrun

A computation for when a block group overruns the end of an image
was consistently storing a negative number in an unsigned var,
and then checking for >0, which is always true for negative numbers.
So first check if the number will be positive before computing it.

Change-Id: Ic8cff8f9ab9f4ea8c5a4dc42143c2430fa87ba12
/system/extras/ext4_utils/allocate.c
4df62f342dbbe2f5cca831ce789dc0426d32ec03 07-Feb-2013 Nick Kralevich <nnk@google.com> ext4_utils: add filesystem capabilities support.

Add support for specifying filesystem capabilities when
creating a new filesystem.

The combination of SELinux extended attributes plus
filesystem capability extended attributes is too big
to fit inside one inode entry. Because of this, I added
support to ext4_utils to create an xattr block and link
the inode to that block. We continue to try to fit
everything inside the inode if possible, but fall over to
creating a block if the extended attribute is too big.

Change-Id: I40ebb63975b15ecd8c565486e171b4d50cd4dfaa
/system/extras/ext4_utils/allocate.c
56497f28bd20001dd5f931208e8d948cf2f81b2f 04-Feb-2013 Colin Cross <ccross@android.com> ext4_utils: mark uninitialized inode tables in block groups

Block groups that have no used inodes have their inode table left
uninitialized, unless -t is specified, in which case they are
explicitly zeroed. When they are uninitialized, writing a sparse
ext4 image over existing data can cause e2fsck to confuse the
uninitialized data for lost inodes.

Set the EXT4_BG_INODE_UNINIT flags on block groups that have no
used inodes. This flag requires the block group checksum feature
to be enabled, so also enable the checksum feature in the superblock
and compute the checksum for the block group.

Since zeroing the inode tables is now useless, remove the code for
it and deprecate the -t command line option.

Change-Id: I4927c1d866d051547cf0dadc8c8703ded0163925
/system/extras/ext4_utils/allocate.c
f0ee37ffded79afdb03e15ae3a69969d2b7e6079 25-Apr-2012 Colin Cross <ccross@android.com> libsparse: make API sane

Replaces the libsparse API with a sane one based on an opaque
pointer.

Change-Id: I93bc9cf9a6b912a993ef554dbe6ffe2f0f723383
/system/extras/ext4_utils/allocate.c
dc5abeee1e6fc4827ee0d5ece12aaed2dd56f4c7 24-Apr-2012 Colin Cross <ccross@android.com> Refactor sparse file support into libsparse

Minimal refactoring of output_file.c into libsparse in preparation
for completely separating libsparse from ext4_utils.

Moves output_file.c, backed_block.c, and parts of ext4_utils.c
into libsparse. The only changes to the remanining files in
ext4_utils are using the new sparse.h header, and moving the
wipe call out of output_file.c and into make_ext4fs.c.

Change-Id: I1f66f6c3e05230a350023c5b4ea4422f16a73c4b
/system/extras/ext4_utils/allocate.c
107a9f161babc20daf915311146b0e864d3b4157 30-Jun-2011 Ken Sumrall <ksumrall@android.com> Bug fixes to make_ext4fs

Fix definition of uuid struct.
Properly set the block_group number in each backup copy of the superblock.
Adjust the info.total_inodes field after rounding up the inodes per block group.
Add the option -t to initialize all the inode tables. If also specified with
the -s option, use the CHUNK_TYPE_FILL sparse records to initialize them.

Change-Id: Idd8bcee1b9bde3e82ad8da89ef974fbc12d7a6c6
/system/extras/ext4_utils/allocate.c
33f96c66e9a1f2e266a75e5e84c091dffa6ef118 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Add support for >2G input files

Change-Id: I6af69d676610099d3912e90fcab3cbdc27ace4e2
/system/extras/ext4_utils/allocate.c
22742ce739a046a079b2e1b03342a25472dfa352 23-Dec-2010 Colin Cross <ccross@android.com> ext4_utils: Move bg_desc_reserved_blocks from aux_info to info

Change-Id: Ic635afbb8819a00ca23ba2f93413fe707e2eec87
/system/extras/ext4_utils/allocate.c
881cca2f88ddcce86483b3ba95546b5641de8c0e 21-Jun-2010 Colin Cross <ccross@android.com> Split out libext4_utils

Change-Id: I12aa52b75607379add2669fddba4cd7dc2bb527f
/system/extras/ext4_utils/allocate.c
8aef66d2125af8de7672a12895276802fcc1948f 21-Jun-2010 Colin Cross <ccross@android.com> Fix whitespace

Change-Id: I37da6c38cd33ae22a0578ed8e91650e35972bf6a
/system/extras/ext4_utils/allocate.c
a1a175aef60677ed877bcb52db553705a8e8c20f 18-Jun-2010 Colin Cross <ccross@android.com> Fix zero-length files

Change-Id: I35812aa7a992d30ec84da57ddb1dccba7b1adf60
/system/extras/ext4_utils/allocate.c
ec0a2e83dc66d67addeb90e83144187691852a3e 11-Jun-2010 Colin Cross <ccross@android.com> Initial commit of ext4_utils

Change-Id: I911d5b7fd7170ec81d544850717d8e69976e272b
/system/extras/ext4_utils/allocate.c