markfasheh / duperemove

Tools for deduping file systems
GNU General Public License v2.0
816 stars 81 forks source link

Add btrfs-clone-range #111

Closed CyberShadow closed 8 years ago

markfasheh commented 8 years ago

Thanks for the patch, however I don't feel like we need this in duperemove at the moment.

CyberShadow commented 8 years ago

I couldn't find a stand-alone utility to clone a file range. I needed it to insert a bootsector before a partition image. Have I overlooked one?

The reason I submitted is that I found people referencing this project solely because of its btrfs-extent-same utility, which is useful on its own.

markfasheh commented 8 years ago

Hmm yeah there isn't much out there that I can recall. Xfstests rolls their own for testing btrfs clone:

http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=blob;f=src/cloner.c;h=18c44b9770f5ab61316c639f8a647bc08011766c;hb=HEAD

does that work for you?

CyberShadow commented 8 years ago

Personally I don't mind either way, as I can continue using the tool I wrote. Utilitaristically, I think it would be nice for there to be a tool that can be packaged, accompanied by a man page, etc. Completely understandable if that's outside this project's scope.

Ferroin commented 8 years ago

Ideally, such a tool (as well as some way to call the ioctl duperemove uses) should be present in btrfs-progs. Those ioctls are actually the only two I know of right now that aren't usable from btrfs-progs.