diff options
author | David Anderson <dvander@google.com> | 2020-01-24 19:19:27 -0800 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2020-01-25 10:39:47 -0800 |
commit | 671bd812cfa6454c0d9b55ace53c3d1ecd176cba (patch) | |
tree | 179043c2f36f40b3d7d7d5ed9faafb3fe9a7dbe5 /trusty/coverage/coverage_test.cpp | |
parent | f3700b9e4234b432a4b94f8e999ec81025f2bf15 (diff) |
Fix mounting /data on Virtual A/B devices without metadata encryption.
When using partitions backed by /data, for example during a Virtual A/B
merge or "adb remount" on a Virtual A/B device, the userdata block
device is seen as in-use when /data mounts in second-stage init. This
subsequently prevents mount() or e2fsck from working. Metadata-encrypted
devices are not affected, because dm-default-key provides a wrapping
block device that can be used exclusively.
This patch addresses the problem by detecting when userdata has
device-mapper dependencies. If it does, and the device is not
metadata-encrypted, we introduce a dm-linear wrapper around userdata.
It is created on demand, but like logical partitions, it exists until
the device reboots.
Bug: 134949511
Test: adb remount, cuttlefish boots
Change-Id: Ifbfea1591a6e58978fdaffd6ef889afabd10e270
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions