+85
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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