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

Commit 00c1c7cc authored by Sandeep Dhavale's avatar Sandeep Dhavale
Browse files

libsnapshot: introduce snapuserd with ublk support



This substantial commit integrates ublk (userspace block device) support
into snapuserd, enabling a new mechanism for managing snapshot devices.

Key changes include:
* Initial Ublk Server Implementation: Adds the core ublk server
    for snapuserd, including plumbing, async I/O handling, and
    data copying within `snapshot_handle_io_async()`.
* Device Creation & Lifecycle Management: Introduces `CreateDevice()`
    and `StopDevice()` interfaces for `UblkBlockServer` to manage
    ublk device lifecycle, ensuring proper cleanup and stability.
* Dynamic Ublk Enablement: Implements logic to conditionally use
    ublk based on board read-only properties.
* DM-Linear Device Handling: Creates and manages dm-linear devices
    on top of ublk devices so dm-switch tables can work with ublk
    devices.
* Uevent Helper Callback: Adds support for a uevent helper callback
    to facilitate ublk device lifecycle in early boot stages via init
    using socketpair().
* API Enhancements: Introduces `GetSnapshotDeviceName()` API to
    retrieve ublk device names, and `UpdateUsesUblk()` (with and without
    lock) for cached ublk status checks.

This integration allows for testing of snapshot updates and
daemon transitions with ublk.

Bug: 414812023
Test: th
Change-Id: I7fbfa5ccdbe4d688352283343da4ca9546a4fcb9
Signed-off-by: default avatarSandeep Dhavale <dhavale@google.com>
parent a73d2b72
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