Age | Commit message (Collapse) | Author |
|
Defining _LARGEFILE64_SOURCE in ext4_utils.h is problematic because
ext4_utils.h is included by system/core/fs_mgr after system headers,
which could cause inconsistent definitions. _LARGEFILE64_SOURCE was
only being used for lseek64, which is unnecessary when _FILE_OFFSET_BITS=64
is set. Remove _LARGEFILE64_SOURCE and switch lseek64 to lseek.
Also move _FILE_OFFSET_BITS=64 to the Android.bp file, the functions
defined in ext4_utils.h don't use off_t. Remove _GNU_SOURCE, it is
already set by the default -std=gnu11.
This is a step towards removing usage of _LARGEFILE64_SOURCE in favor
of setting _FILE_OFFSET_BITS=64 globally.
Test: builds
Change-Id: I14c7e0ca0fd85920aa0b1d1a18fc5a11d352a4c5
|
|
Although sizeof(char*) and sizeof(struct ext4_super_block*)
should have the same value; use the correct type to suppress
the warning.
Bug: 261919363
Test: make tidy-system-extras_subset
Change-Id: Ib6e17a3ef5010aa01d7fdb4f8e804f4714574edd
|
|
|
|
fs_mgr needs to know the value of the
EXT4_FEATURE_COMPAT_STABLE_INODES feature flag
so it can enable it.
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I9f7cd9cb2a342d1b2e065e46fb230593f3f33e30
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
|
|
The module in it appears to be unused now that
there's also a mk2fs.conf module in the Android.bp
file.
Test: Presubmits
Change-Id: I5472158d169795b73f02650175857ce46b9c7d8a
|
|
Also update some python 3 issues in mkuserimg_mke2fs.
Bug: 203436762
Test: Presubmits
Change-Id: Ib919d40c96d3c26d29d8c1b4af67300c4130ec42
|
|
|
|
1. Use // to ensure division output is integer
2. Specify text=True so that output of subprocess is str not bytes
Test: th
Change-Id: I7b99598e96d460318c0a65853816b1c8fba899ce
|
|
It either needs to use this file this filegroup, or we'd need to move
the host definition to Android.bp (but it installs in the "wrong"
directory according to Soong).
Bug: 187222815
Change-Id: I5098f77d04738999c3ddba2b647678e6aff22eb1
|
|
Bug: N/A
Test: N/A
Change-Id: I5883a69efe6485f7efa107ee7b2aa9e54b05ba02
|
|
This is needed to link libfs_mgr into snapuserd.
Bug: 193833730
Test: builds
Change-Id: I41aec802503f8c4bd0ddcf36140afdf02f68536e
|
|
Bug: 187196593
Test: boot
Change-Id: I3b4b8c4758d5e710d3c98dd138b0893a7b320601
|
|
Added SPDX-license-identifier-Apache-2.0 to:
alloc-stress/Android.bp
app-launcher/Android.bp
boot_control_copy/Android.bp
bootctl/Android.bp
boottime_tools/bootanalyze/stressfs/Android.bp
boottime_tools/bootio/Android.bp
brillo_config/Android.mk
checkpoint_gc/Android.bp
cppreopts/Android.bp
crypto-perf/Android.bp
ext4_utils/Android.bp
ext4_utils/Android.mk
f2fs_utils/Android.bp
ioblame/Android.bp
ioshark/Android.bp
iotop/Android.bp
kexec_tools/Android.bp
latencytop/Android.bp
libfec/Android.bp
libfec/test/Android.bp
libfscrypt/Android.bp
libfscrypt/tests/Android.bp
libjsonpb/parse/Android.bp
libjsonpb/verify/Android.bp
memory_replay/Android.bp
memtrack/Android.bp
mmap-perf/Android.bp
module_ndk_libs/libnativehelper/Android.bp
multinetwork/Android.bp
pagecache/Android.bp
partition_tools/Android.bp
partition_tools/aidl/Android.bp
perf2cfg/Android.bp
postinst/Android.bp
preopt2cachename/Android.bp
profcollectd/Android.bp
profcollectd/libprofcollectd/Android.bp
profcollectd/libprofcollectd/bindings/libflags/Android.bp
pssbench/Android.mk
puncture_fs/Android.bp
runconuid/Android.bp
sane_schedstat/Android.bp
showslab/Android.bp
simpleperf/Android.bp
simpleperf/runtest/Android.bp
simpleperf/scripts/inferno/Android.bp
simpleperf/simpleperf_app_runner/Android.bp
slideshow/Android.mk
sound/Android.bp
squashfs_utils/Android.bp
su/Android.mk
taskstats/Android.bp
tests/Android.bp
tests/audio/alsa/Android.bp
tests/binder/benchmarks/Android.bp
tests/bootloader/Android.mk
tests/cpueater/Android.bp
tests/crypto/Android.bp
tests/directiotest/Android.bp
tests/ext4/Android.mk
tests/framebuffer/Android.bp
tests/fstest/Android.bp
tests/icachetest/Android.bp
tests/iptables/qtaguid/Android.bp
tests/kernel.config/Android.mk
tests/lib/Android.bp
tests/lib/testUtil/Android.bp
tests/memeater/Android.mk
tests/pagingtest/Android.mk
tests/pftest/Android.bp
tests/schedtest/Android.bp
tests/storage/Android.bp
tests/suspend_stress/Android.bp
tests/tcp_nuke_addr/Android.bp
tests/timetest/Android.bp
tests/uevents/Android.bp
toolchain-extras/Android.bp
vbmeta_tools/Android.bp
verity/Android.bp
verity/fec/Android.bp
zram-perf/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
cpustats/Android.bp
Added SPDX-license-identifier-BSD to:
ANRdaemon/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: Ia559848af903a7b6746d9b12b7de8b83bc57f99d
|
|
This reverts commit 044d055c842a5750359ed71dfe50a6a4bf5f4cc3.
Reason for revert: Needs to run as multiple roots.
Change-Id: I8e06e7eb19e0f634f52fbd8a1c6662f43e347dd5
|
|
Added SPDX-license-identifier-Apache-2.0 to:
boot_control_copy/Android.bp
bootctl/Android.bp
boottime_tools/bootanalyze/stressfs/Android.bp
boottime_tools/bootio/Android.bp
checkpoint_gc/Android.bp
cppreopts/Android.bp
crypto-perf/Android.bp
ext4_utils/Android.bp
ext4_utils/Android.mk
f2fs_utils/Android.bp
ioshark/Android.bp
iotop/Android.bp
kexec_tools/Android.bp
latencytop/Android.bp
libfec/Android.bp
libfec/test/Android.bp
libfscrypt/Android.bp
libfscrypt/tests/Android.bp
libjsonpb/parse/Android.bp
libjsonpb/verify/Android.bp
memory_replay/Android.bp
memtrack/Android.bp
mmap-perf/Android.bp
module_ndk_libs/libnativehelper/Android.bp
multinetwork/Android.bp
pagecache/Android.bp
partition_tools/Android.bp
perf2cfg/Android.bp
postinst/Android.bp
preopt2cachename/Android.bp
profcollectd/Android.bp
profcollectd/libprofcollectd/Android.bp
profcollectd/libprofcollectd/bindings/libflags/Android.bp
puncture_fs/Android.bp
runconuid/Android.bp
sane_schedstat/Android.bp
showslab/Android.bp
simpleperf/Android.bp
simpleperf/runtest/Android.bp
simpleperf/scripts/inferno/Android.bp
simpleperf/simpleperf_app_runner/Android.bp
slideshow/Android.mk
sound/Android.bp
squashfs_utils/Android.bp
su/Android.mk
taskstats/Android.bp
tests/Android.bp
tests/audio/alsa/Android.bp
tests/binder/benchmarks/Android.bp
tests/bootloader/Android.mk
tests/cpueater/Android.bp
tests/crypto/Android.bp
tests/directiotest/Android.bp
tests/ext4/Android.mk
tests/framebuffer/Android.bp
tests/fstest/Android.bp
tests/icachetest/Android.bp
tests/iptables/qtaguid/Android.bp
tests/kernel.config/Android.mk
tests/lib/Android.bp
tests/lib/testUtil/Android.bp
tests/memeater/Android.mk
tests/pagingtest/Android.mk
tests/pftest/Android.bp
tests/schedtest/Android.bp
tests/storage/Android.bp
tests/suspend_stress/Android.bp
tests/tcp_nuke_addr/Android.bp
tests/timetest/Android.bp
tests/uevents/Android.bp
toolchain-extras/Android.bp
vbmeta_tools/Android.bp
verity/Android.bp
verity/fec/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
cpustats/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
legacy_notice
to:
Android.bp
Added SPDX-license-identifier-BSD
to:
ANRdaemon/Android.bp
Added legacy_notice
to:
alloc-stress/Android.bp
app-launcher/Android.bp
brillo_config/Android.mk
ioblame/Android.bp
partition_tools/aidl/Android.bp
pssbench/Android.mk
zram-perf/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: Ie7c022a4d7f828a89d0cda663684a497af37006e
|
|
So far, mkuserimg_mke2fs ran only in the Make world. Now, it will be
run in the Soong world via the new android_filesystem module.
But the problem is that, when running in Soong, the PATH environment
variable doesn't point to the host binary directory (e.g.
out/soong/host/linux-x86/bin). This is a problem for this script because
sub tools like mke2fs and e2fsdroid have been invoked just by their
names expecting that they will be under PATH.
To fix this problem, the tool now tries to find the sub tools in the
same directory as this script is located at, which would be the host
binary directory.
Bug: 172414391
Test: m
Change-Id: Ia42d0b2533357f20c4dcf1cb7d2587c35165b799
|
|
apexer use mke2fs, e2fsdroid and resize2fs to package image files.
And, all of mke2fs, e2fsdroid and resize2fs depend on MKE2FS_CONF
environment variable.
The pack process should make sure the whole process use the same
configuration.
Test: atest --host apexer_test
Test: out/host/linux-x86/nativetest64/apexer_test/apexer_test
Bug: 148659029
Change-Id: I1ae673e324e7ea5e43ace43d120c4c46b8b3d041
Merged-In: I1ae673e324e7ea5e43ace43d120c4c46b8b3d041
(cherry picked from commit 836032e26dd96aa8b3c3dc9f99304350e1a7424f)
|
|
Format *.cpp according to the new .clang-format. The following command
was used to generate this change:
$ find . \( -name \*.cpp -o -name \*.h \) -exec clang-format \
--style=file -i {} \;
Test: mm
Bug: 171699326
Change-Id: I2514746ad3fe3d0c14f7efcf3868997a3a31be6f
|
|
ext4_utils isn't aware of filesystems with the "64bit" feature. The
64bit feature changes the filesystem-wide block numbers to be 64-bit
instead of 32-bit, and it increases the size of the block group
descriptors. Apparently we've gotten away with this until now since
ext4 filesystems in Android haven't been using the 64bit feature.
However, change I618a65d7afc63a617f5f2582c93002af7f8e7234 added support
for the metadata_csum feature, and Android enables 64bit whenever
metadata_csum is enabled because it improves the usefulness of
metadata_csum. Separately, when Cuttlefish is configured to use ext4
and 'launch_cvd -data_policy always_create' is used, the filesystem ends
up with the 64bit feature because the host's mke2fs.conf is used.
vold's encrypt-in-place code doesn't work correctly on 64bit
filesystems, since it uses the block group descriptors to identify
in-use blocks, and ext4_utils mis-reads the descriptors such that
descriptor 'i' gets read into the structs for descriptors 2*i and 2*i+1.
Note that this is a problem even if the filesystem doesn't contain more
than 2^32 blocks (which can still be assumed to be true on Android).
So, fix ext4_utils to correctly read the block group descriptors on both
64bit and !64bit filesystems.
Test: Booted Cuttlefish with ext4 + metadata encryption, both with and
without the 64bit feature. Before, it only worked with !64bit.
Change-Id: I0682971e022407f43ccb3b08c997b787d1a9e649
|
|
Add a declaration for ext4_bg_has_super_block() so that the
encrypt-in-place code in vold can use it to determine whether a backup
superblock is present in a block group.
Bug: 162479411
Bug: 161871210
Change-Id: Ic090bf4e88193b289b04c5254ddf661ef40b037e
|
|
Including ext4_utils.h breaks in some files because it defines common
identifiers (like "error"). Move these into the only .cpp files that use
them.
Bug: N/A
Test: manual test
Change-Id: I4605b560d09ec46c24a2c42a463f563cfe438356
|
|
|
|
This flag cause mke2fs to reserve a percentage of blocks as metadata for
resizing the filesystem. This wastes a small amount of space (a few
hundred KB), but more importantly, makes incremental diffs worse when
using BaseFS. Since the number of reserved blocks can change with small
differences to the image size, this can cause off-by-one issues leading
to large sequences of moves.
In a sample Virtual A/B simulation, this reduces the snapshot size by
200MB.
Bug: 139201772
Test: debugfs -R stats <image>
Change-Id: I57c1456356975dddbb5bcc12ea25ded189848568
|
|
It needs to add feature definition.
Bug: 149039306
Change-Id: I0b32ecb43cf9ef250a2a86650dca53e749006c15
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
|
|
fs_mgr needs to know the value of the casefold feature flag
so it can enable it.
Bug: 138322712
Test: Compiles
Change-Id: I6acca568622174a4b15a6bfa101fcc676c12dca7
|
|
Depending on the environment where mkuserimg_mke2fs.py is used, it's
difficult to locate the configuration file mke2fs.conf. To avoid
potential issues, let's just package mke2fs.conf with
mkuserimg_mke2fs.py.
Bug: 112937752
Change-Id: I9eb911fc9357e65a666bafd3089461cac8289008
|
|
Bug: 137311188
Test: library still builds
Change-Id: Iee71887bc0f969c349369b7d70c981c3f89ce23a
|
|
* changes:
wipe: guarantee zeros after wipe out partitions
ext4_utils: build by C++
|
|
Stale data in the partition can bypass formatting by fs_mgr and cause filesystem
unmountable.
Bug: 122989894
Change-Id: Id2aa4baefeb8308ce14eeaa7790a1aab35e522aa
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
|
|
With this patch, we can use many library functions.
Bug: 122989894
Change-Id: I761a93d3f6460529a99086e33803e96f1a307079
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
|
|
Add VERITY constant to ext4_utils.
Bug: 117437571
Test: bootable for phone projects
Change-Id: I77cab3594223df860345266fdbf568c02734c1a8
|
|
When we construct an ext4 system filesystem image, tune2fs reports:
Last mounted on=<not available>
With this change, it will now report:
Last mounted on=/system (or /vendor etc)
This is a cosmetic administrative change.
Test: manual
Bug: 122328872
Change-Id: Ia5370c0b222ee6ad5ee1db10a2810e99b7d01186
|
|
Caller should be able to add stability to the inode-size based on
system requirements. For example we may wish to select an inode-size
that will absorb all the xattr inline.
Test: manual
Bug: 122328872
Change-Id: I07ce400b6482646f9b5b353a00f592410aad13b7
|
|
See build/soong/README.md for more information.
Also remove a useless HOST_OS check -- HOST_OS will always be either
linux or darwin, we don't support building directly on windows.
Test: m blk_alloc_to_base_fs
Change-Id: I13927de82ff769cf3692b58b9432fb79c856b8d3
|
|
File-based encryption related code no longer belongs in ext4_utils, as
it is now used on both ext4 and f2fs, since both filesystems share the
same kernel API for encryption. Refactor it into its own library,
libfscrypt.
Note that the keyring is renamed from "e4crypt" to "fscrypt", which is
technically a user-visible change, but as far as I know nothing depends
on it other than vold which is being updated too.
Test: built, booted device with f2fs encryption
Change-Id: I3c302564262412a5d5e672bd213e7cfada5f49cc
|
|
There's no user data there, just code.
Bug: 112455435
Test: Using an APEX with Direct I/O in /data/apex works again
Change-Id: I5e5557445ea5d638d2dfc4db7d782ee2da207bc1
|
|
The shell script is not used as we have switched to the python binary.
Test: mma
Bug: 112555072
Change-Id: I8849fc91a6d62b58a01b29544f2bc5b24c7df89e
|
|
Bug: N/A
Test: builds
Change-Id: Idde3d0dafba08ffcd12cc9aa3540550e2601a227
|
|
|
|
Bug: 112780007
Test: Build with other changes in the topic (aosp_taimen-userdebug).
Test: Boot into recovery. Verify basic functionalities (`adb shell` and
`adb sideload`, factory reset).
Change-Id: Ic72c5bebf6c72373e67a483062dc160638c68a4e
|
|
The mkuserimg_mke2fs.sh was a shell script, which expects all the
arguments in order. This cl changes the script to python which leverages
python's argumentparser and unittest modules.
The script usage is unchanged; and this tool will be packed into the
otatools.zip in the follow up cls. Then we'll change the caller site
gradually; and remove the old shell script after that.
Bug: 112555072
Bug: 63866463
Test: run unit tests & build a userdata image
Change-Id: Ie6b687da3de31a3481363f01d2b5c12df91ca5ce
|
|
This allows second stage init using libext4_utils.so.
Bug: 112494634
Test: `m dist checkbuild` with aosp_marlin-userdebug
Change-Id: I72141cff901c7a124c9b791535b66884eae747fb
|
|
This is a partial revert of
commit 6a0fa62dc71157f85b24ed15e39ada277f9b5201.
Remove the Speck encryption support. It was eventually
decided not to allow Speck in Android P, so this code
is no longer needed and wasn't used outside of testing.
We retain the e4crypt_get_policy_flags() changes from original
commit, though.
Bug: 112009351
Test: Confirmed AES continues to work with FBE.
Change-Id: I53b091dd4c5392de7a00a8c168919fb55e527eaf
|
|
am: 3dafe0b635
Change-Id: I68145812813f157121f6f9ca17a14edba0d4fafe
|
|
The real WTF here might be that we copy an entire file byte-by-byte if
we ever take this path...
Bug: http://b/112146629
Bug: https://www.viva64.com/en/b/0579/
Test: builds
Change-Id: I8bfe6befa3851a839b499ac222c30d26a82bc075
|
|
am: 39e0ab1477
Change-Id: I8060a1cf1e2b3424f2f703cd07484a6f086ce694
|
|
|
|
make_ext4fs has been replaced with mke2fs.
Bug: 64395169
Change-Id: Iad3a8346ca211e4d5a5ab7046c2bdd199292a867
Merged-In: Iad3a8346ca211e4d5a5ab7046c2bdd199292a867
(cherry picked from commit 7c2d21b4c28360f5e058e1632d87028f6b43e90a)
Test: m native-host-cross with clang (added during cherry-pick to
get past repo upload hook).
|
|
am: 9e00d29710
Change-Id: I6a1cb94f0f3fec3511838ebb809fa3029d94d0fc
|
|
In that case, total block count matches number of blocks per group,
which yields precisely 1 group. last_group_size in that case was
calculated as 0, which together with group count 1 incorrectly triggered
the file size check. Special case that scenario by assigning
last_group_size as 32768 in that case.
Change-Id: I3b6e236a4d6951aca732324b85e46b8c4b5757b7
|