libsnapshot: explicitly control UBLK usage in snapuserd
When performing an OTA from a non-UBLK build to a UBLK-enabled build,
the snapshot merge must use the dm-user backend. This is because the
snapshot data was created by a system without UBLK support.
Previously, snapuserd would auto-detect the backend, which could
incorrectly select UBLK on the target build, causing merge failures.
This change introduces a mechanism for libsnapshot to explicitly
instruct snapuserd on which backend to use. When initiating a merge,
libsnapshot now passes a "-ublk" or "-noublk" flag to snapuserd based
on the source build's capabilities stored in the snapshot metadata.
snapuserd is updated to respect these flags. If no flag is passed
(e.g., during tests), it falls back to its original auto-detection
logic.
A new test, MergeRespectsSourceUblkDisabled, is added to verify that
a merge correctly uses dm-user when the source build did not support
UBLK.
Bug: 362683283
Test: MergeRespectsSourceUblkDisabled
Test: vts_libsnapshot_test
Change-Id: I192bc8c43517abd0ad6735b47c464f104eb1d482
Signed-off-by:
Sandeep Dhavale <dhavale@google.com>
Loading
Please register or sign in to comment