Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0579912b authored by Sandeep Dhavale's avatar Sandeep Dhavale
Browse files

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: default avatarSandeep Dhavale <dhavale@google.com>
parent 4b3ade06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment