]> git.hungrycats.org Git - linux/commit
btrfs: add no_mtime flag to btrfs-extent-same
authorMark Fasheh <mfasheh@suse.de>
Tue, 23 Jun 2015 21:28:40 +0000 (14:28 -0700)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Wed, 24 Jun 2015 20:50:33 +0000 (16:50 -0400)
commite9b1e79bc5d2e84472feef75b98d3cd29a5c4937
tree91d42c649991871eefb8eeacfb9e784dd1f7eb39
parentf14a311197d196d56a63c22443c0e6f2c94bf223
btrfs: add no_mtime flag to btrfs-extent-same

One issue users have reported is that dedupe changes mtime on files,
resulting in tools like rsync thinking that their contents have changed when
in fact the data is exactly the same. Clone still wants an mtime change, so
we special case this in the code.

With this patch an application can pass the BTRFS_SAME_NO_MTIME flag to a
dedupe request and the kernel will honor it by only changing ctime.

I have an updated version of the btrfs-extent-same test program with a
switch to provide this flag at the 'no_time' branch of:

https://github.com/markfasheh/duperemove/

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
fs/btrfs/ioctl.c
include/uapi/linux/btrfs.h