[PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-22 Thread Mark Fasheh
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 th

[PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-23 Thread Mark Fasheh
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 th

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-23 Thread David Sterba
On Mon, Jun 22, 2015 at 03:47:42PM -0700, Mark Fasheh wrote: > --- a/fs/btrfs/ioctl.c > +++ b/fs/btrfs/ioctl.c > @@ -87,7 +87,8 @@ struct btrfs_ioctl_received_subvol_args_32 { > > > static int btrfs_clone(struct inode *src, struct inode *inode, > -u64 off, u64 olen, u64 ole

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-23 Thread Mark Fasheh
On Tue, Jun 23, 2015 at 05:11:56PM +0200, David Sterba wrote: > On Mon, Jun 22, 2015 at 03:47:42PM -0700, Mark Fasheh wrote: > > --- a/fs/btrfs/ioctl.c > > +++ b/fs/btrfs/ioctl.c > > @@ -87,7 +87,8 @@ struct btrfs_ioctl_received_subvol_args_32 { > > > > > > static int btrfs_clone(struct inode

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-24 Thread Zygo Blaxell
On Tue, Jun 23, 2015 at 05:11:56PM +0200, David Sterba wrote: > On Mon, Jun 22, 2015 at 03:47:42PM -0700, Mark Fasheh wrote: > > --- a/fs/btrfs/ioctl.c > > +++ b/fs/btrfs/ioctl.c > > @@ -87,7 +87,8 @@ struct btrfs_ioctl_received_subvol_args_32 { > > > > > > static int btrfs_clone(struct inode

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-25 Thread David Sterba
On Wed, Jun 24, 2015 at 04:17:32PM -0400, Zygo Blaxell wrote: > Is there any sane use case where we would _want_ EXTENT_SAME to change > the mtime? We do a lot of work to make sure that none of the files > involved have any sort of content change. Why do we need the flag at all? Good point, I do

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-25 Thread Austin S Hemmelgarn
On 2015-06-25 08:52, David Sterba wrote: On Wed, Jun 24, 2015 at 04:17:32PM -0400, Zygo Blaxell wrote: Is there any sane use case where we would _want_ EXTENT_SAME to change the mtime? We do a lot of work to make sure that none of the files involved have any sort of content change. Why do we n

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-25 Thread Zygo Blaxell
On Thu, Jun 25, 2015 at 09:10:31AM -0400, Austin S Hemmelgarn wrote: > On 2015-06-25 08:52, David Sterba wrote: > >On Wed, Jun 24, 2015 at 04:17:32PM -0400, Zygo Blaxell wrote: > >>Is there any sane use case where we would _want_ EXTENT_SAME to change > >>the mtime? We do a lot of work to make sur

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-25 Thread Mark Fasheh
On Thu, Jun 25, 2015 at 02:52:50PM +0200, David Sterba wrote: > On Wed, Jun 24, 2015 at 04:17:32PM -0400, Zygo Blaxell wrote: > > Is there any sane use case where we would _want_ EXTENT_SAME to change > > the mtime? We do a lot of work to make sure that none of the files > > involved have any sort