Skip to content

Add reflink/clone command #396

Open
Open
@kdave

Description

@kdave

Add a command eg. btrfs fi reflink (name can be finalized later) that would:

  • in the simplest form do a reflink from file A to B (possibly honoring the fileattrs like NOCOW)
  • allow to specify the source range and target offset of clone

To be decided:

  • multiple files on one command line, eg. multiple sources into one target (N:1), or multiple targets (N:N), or with 1:N for completeness
  • exact syntax, maybe positional arguments so we could have something like --source file1 1 --start 0 --length 4K --target file2 --offset 8K
  • commands proccessed in order so names can be repeated and later commands would be affected by effects of previous commands (like clone 0-4K to 4K, then clone 0-8K to 8K etc, or maybe it's too crazy)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions