Re: [PATCH 1/3] fs: Document the reflink(2) system call.

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

 



On Tue, May 05, 2009 at 11:11:01PM +0100, Jamie Lokier wrote:
> Joel Becker wrote:
> > 	"Shares the data extents of the source file".  I should hope
> > that chmod doesn't require copying out all the data.
> 
> Oh... I was under the impression that it would, because the
> man-page-of-sorts says attributes must be the same and the following
> question:
> 
> > Jamie Lokier wrote:
> > > reflink() sounds useful already, but is there a compelling reason why
> > > both files must have the same attributes, and changing attributes will
>                                                   ------------------------
> > > break the COW?
>     --------------
> >
> > Yeah, because without it you can't use it for snapshotting.
>   ----
> 
> If that's not true, then I change my tune substantially and like
> reflink() semantics a lot more. :-)

	I was yeah'ing the first part.  The explicit requirement of
reflink is sharing the data extents (including xattr extents).  So, for
example, both the btrfs and ocfs2 implementations can
chmod/chown/utimes/etc all they want after the reflink is done, and no
data sharing is broken.  The data sharing is broken only via data
modification.  Both btrfs and ocfs2 will only copy the hunk modified,
leaving the rest of the file shared; you won't have long wait times for
the CoW of large files just because you modified one byte.

Joel

-- 

"Get right to the heart of matters.
 It's the heart that matters more."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@xxxxxxxxxx
Phone: (650) 506-8127
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux