Skip to content

Add support for Discard operations #1931

Description

@ahrens

With the support of NVMe Discard operations introduced by oxidecomputer/propolis#1105, Propolis accepts Discard operations for all disk types. For local storage, the Discard operation is passed down to the ZFS raw zvol via ioctl(DKIOCFREE), which will issue a Discard on the underlying physical SSD. But for Crucible disks, the Discard operation is a no-op. We should consider plumbing the Discard operation through Crucible and having it issue a fcntl(F_FREESP) to the underlying files.

The benefit of processing the Discard is similar for local storage and Crucible: although it doesn't make the space available to other uses (because the space that may potentially be used for the Crucible disk remains reserved), it reduces the allocation and fragmentation burden on the underlying subsystem (the SSD's FTL in the case of local storage, or ZFS's metaslab allocator in the case of Crucible).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions