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

Commit 123be547 authored by Sandeep Dhavale's avatar Sandeep Dhavale
Browse files

libsnapshot: Add discard support for COW devices



When a snapshot is deleted, the underlying COW device is not
discarded. This can lead to space not being reclaimed on the physical
device.

This change adds support for discarding the COW device when a snapshot
is deleted. This is done by calling the BLKDISCARD ioctl on the COW
device, which tells the underlying storage to free the blocks used by
the COW device. This is a best-effort operation, and errors are
ignored.

Bug: 412559168
Test: th, OTA and check for discard messages

Change-Id: I5980215ad3a998ef9bc2f20e5feef805fe3c270e
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