coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tools to work with reflinks


From: Pádraig Brady
Subject: Re: tools to work with reflinks
Date: Tue, 13 Jan 2026 13:33:52 +0000
User-agent: Mozilla Thunderbird Beta

On 13/01/2026 08:25, Dick Marinus wrote:
Hello,

I've created some tools to work with reflinks (FICLONERANGE) /
copy_file_range(2).

Reflinks can be used to share equal blocks between files. Cloning a
block using reflinks will not copy any data saving I/O and disk wear/
space.

I use these tools to construct new files from blocks in existing files,
The only tool that comes close to copying file ranges is dd but I
don't think it allows you to specify multiple file ranges per
execution.

You can do multiple operations with dd using this pattern:

  $ (dd operation=1; dd operation=2) < input > output

Currently I've proposed to get copyfilerange added to util-linux:

https://github.com/util-linux/util-linux/pull/3947
https://github.com/util-linux/util-linux/compare/master...meeuw:util-linux:copyfilerange.patch

Would coreutils be a better fit for such a tool or can an existing tool
be extended to share equal blocks between files?

greetings,
Dick Marinus


util-linux seems like a better place for a low level tool like this.
I would see it in a similar space to the existing fallocate(1) tool in 
util-linux.

thanks,
Padraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]