-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for btrfs deduplication #52
base: master
Are you sure you want to change the base?
Conversation
SLOC Directory SLOC-by-Language (Sorted) There’s vim, why would anyone need another editor?
Yeah, one could probably skip the byte-for-byte check in that case.
You are welcome to merge my patch to your fork. Once it’s landed in Debian I’ll use it. |
Thie adds an option -B (or --dedupe) to fdupes which issues the BTRFS_IOC_FILE_EXTENT_SAME ioctl on files that it detects as duplicates, causing btrfs to deduplicate the data on disk. This build option needs to be turned on separately in the Makefile by setting the HAVE_BTRFS_IOCTL_H preprocessor macro to not break builds missing this header. Also fixes a memory leak in escapefilename().
Good point, thanks. I’ve amended this commit and it also skips verifying the file contents now.
Yep, works. I think you could just rip out the couple of lines starting at https://git.kernel.org/cgit/linux/kernel/git/kdave/btrfs-progs.git/tree/ioctl.h#n344 (IANAL though). |
If you decide to ask Debian (or any other distro) to include your version On Mon, Dec 21, 2015, 11:46 AM Jody Bruchon [email protected]
|
Hello Sebastian. I am reluctant to include system-specific code in mainline On Mon, Dec 21, 2015, 11:09 AM Sebastian Schmidt [email protected]
|
with my debian maintainer hat on, I can say that 'fdupes' in debian is tracking https://github.com/adrianlopezroche/fdupes/ and it will keep doing it for the foreseeable future. but I have to admit the development here is a bit on hold, and there are a lot of forks out there which might have interesting features to add to fdupes. @adrianlopezroche do you plan to resume fdupes development? that'd be great! |
Jody Bruchon: Thanks. On Tue, Dec 22, 2015 at 1:08 AM Jody Bruchon [email protected]
|
Sandro Tosi: I haven't abandoned fdupes. I am much more careful about On Mon, Dec 21, 2015 at 9:18 PM Sandro Tosi [email protected]
|
Thie adds an option -D (or --dedupe) to fdupes which issues the
BTRFS_IOC_FILE_EXTENT_SAME ioctl on files that it detects as duplicates,
causing btrfs to deduplicate the data on disk.
This build option needs to be turned on separately in the Makefile by
setting the HAVE_BTRFS_IOCTL_H preprocessor macro to not break builds
missing this header.
Also fixes a memory leak in escapefilename().