Reorder COW ops vector based on merge sequence. We don't
need additional vector to be stored in memory.
Memory usage for a full OTA on Pixel:
Without Patch:
RssAnon: 61020 kB
With Patch:
RssAnon: 51112 kB
Bug: 237490659
Test: OTA on Pixel
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I543dd73acfa7cf4e57379e82bc184e943072e7c8
This test has always been flaky, and is not testing something super
valuable: we know that image creation succeeds throughout the rest of
the suite, so it's not very interesting to know that it can succeed in a
low-space scenario.
The inverse test is much more valuable, since we want the correct status
code when creation fails due to low space.
Bug: 240391002
Test: vts_libsnapshot_test
Change-Id: I6235d11033d2f30efe530077b877863ba2574810
Diagnosing DM_DEV_REMOVE failures in the test harness is quite
difficult, and it's not clear if failures are spurious or not. Instead
use SnapshotManager's helper function, which can retry on failure, and
will self-diagnose issues on legitimate failures.
Bug: N/A
Test: vts_libsnapshot_test
Change-Id: Ibcaa8406e8b1e8758b99a8e9b58c58d68ed57685
These checks have historically been unreliable, and we make no
guarantees around dev_t with overlayfs.
Bug: 242240650
Test: adb-remount-test.sh
Change-Id: I19e7aabec424a22beb0b56d35b198906841178b0
Refactor set_avb_verity_state() to return tri-state result:
{.success=false}
Failed to set verity state.
{.success=true, .want_reboot=false}
Success but verity already is requested state, so no need to reboot.
{.success=true, .want_reboot=true}
Successfully changed verity state, need reboot to take effect.
Setup overlayfs only if verity is going to be or already disabled.
Teardown overlayfs regardless of enable-verity success of not.
This ensures more robust behavior of setup / teardown overlayfs.
Adjust the log messages for consistent wording.
No point logging the errno of fs_mgr_overlayfs_[setup|teardown]
because the error must already be logged by callee.
Bug: 241688845
Test: adb [disable|enable]-verity
Change-Id: I3a77fe567757ca6173e8c3142e77fef483d9b849
aosp/I212bdb0e97016dec50618962d7c24f46d35764c7 changes
`remount` to return MUST_REBOOT after initial overlay setup.
This causes DsuGsiIntegrationTest to fail because the non-zero exit code
cause the test script to think the `remount` command failed.
Change it so that we return 0 instead, to indicate that we
"successfully" setup a new overlay.
We should only return non-zero on unrecoverable error, like when we
failed to disable verity, failed to setup overlay, failed to perform
MS_REMOUNT.
Bug: 241179247
Test: DsuGsiIntegrationTest
Change-Id: I280ffa988118c59e366cdd5bd1479bb43896c278
In commit 5d72d6c, an unused code path for e2fsdroid and sload_f2fs was
removed from fastboot. Remove them from the build dependency list.
Bug: 237960487
Test: m fastboot
Change-Id: Ibee72a86eeb43fcde3a032094bfc1c19de09bc03
* changes:
remount: Remove the "backing" parameter to fs_mgr_overlayfs_setup.
remount: Prevent error spam when remounting fails.
remount: Move more stuff out of do_remount.
Cuttlefish's combined fstab has two entries for every partition, which
causes a lot of error spam when remount fails. Fix this by only
remounting entries that match an actual mount point (if such a mount
point exists).
Bug: 241179247
Test: remount on broken kernel
Change-Id: I3ddab553706f98b45f83221fd195f481dfdcc5c0
This moves more logic out of do_remount and into main(). This eliminates
some redundant code.
Bug: 241179247
Test: remount
Change-Id: I212bdb0e97016dec50618962d7c24f46d35764c7
Remove even more VB1.0 handling dead code.
Log to both logd and stderr.
Print all debug messages to LOG.
Move all non-externals to annonymous namespace.
Bug: 241688845
Test: adb shell set-verity-state [0|1]
Change-Id: Icda795f185f7bc97607b48d0b529ee02a4580b70
Fix the function name in a log message inside CgroupSetup().
Bug: 213617178
Change-Id: I897c831f5e53093df2664e0e8ceefadf9a89369c
Signed-off-by: Bart Van Assche <bvanassche@google.com>
If next same mount point also is logical partition, but its blk_device
is not updated yet and still is logical partition name not a mapper
device (/dev/block/dm-X) to cause mount failed.
To support the below fstab configs in fstab.postinstall.
system /postinstall ext4 ro,nosuid,nodev,noexec slotselect_other,logical
system /postinstall erofs ro,nosuid,nodev,noexec slotselect_other,logical
Error logs:
system_b: Can't open blockdev
init: [libfs_mgr]__mount(source=system_b(missing),target=/postinstall,type=erofs)=-1: No such file or directory
Bug: b/241716684
Test: After factory device reset, ensure system_b is mounted as EROFS
Change-Id: I02f20f3dfd8c42be9981915eaff88a5948482724