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

Commit f37c4bbf authored by Sandeep Dhavale's avatar Sandeep Dhavale
Browse files

snapuserd: fix race condition during merge-resume



When resuming a merge after a crash, a race condition can occur where
a block is written to both the scratch space and the base device, but
the merge is not yet committed.

This change ensures that when a merge is resumed, the scratch space is
always checked first. Data from the scratch space is prioritized over
the source block to handle overlapping blocks and XOR ops correctly.

This prevents returning wrong data by ensuring that the most up-to-date
block is used when serving the io.

Bug: 441666433
Test: th, manual OTA and reboots
Change-Id: Idacef9726d3f91a3e416f2b56e531a208d213232
Signed-off-by: default avatarSandeep Dhavale <dhavale@google.com>
parent cbd67f8c
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