From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: [PATCH 1/3] fs: Document the reflink(2) system call. Date: Wed, 6 May 2009 00:12:10 +0100 Message-ID: <20090505231210.GK7574@shareable.org> References: <20090505130114.GD17486@mit.edu> <20090505131907.GF25328@shareable.org> <1241530798.7244.65.camel@think.oraclecorp.com> <20090505153629.GB31100@shareable.org> <1241538102.7244.72.camel@think.oraclecorp.com> <20090505160313.GF31100@shareable.org> <4A00A634.4020008@hp.com> <20090505215711.GA7574@shareable.org> <20090505220459.GN7835@mail.oracle.com> <4A00BDA1.3020809@hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chris Mason , Theodore Tso , linux-fsdevel@vger.kernel.org, jmorris@namei.org, ocfs2-devel@oss.oracle.com, viro@zeniv.linux.org.uk To: jim owens Return-path: Received: from mail2.shareable.org ([80.68.89.115]:34950 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752825AbZEEXMP (ORCPT ); Tue, 5 May 2009 19:12:15 -0400 Content-Disposition: inline In-Reply-To: <4A00BDA1.3020809@hp.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: jim owens wrote: > Jamie, > > Joel Becker wrote: > > "Shares the data extents of the source file". > > so with that clarification, do you now agree with this > > > 1) is only for filesystems with COW operation, > > if the fs does not support COW it returns ENOSYS. > > being a requirement so the user can trust that calling > reflink() uses minimal space (inode/extentmap) and only Yes I do, if > a change to the file will trigger a data copy. "file" means the data, not the permissions and timestamps :-) Otherwise there's still a user trust issue, since many applications come to mind who would like to chmod/chown/futimes immediately after making the reflink, and they need to trust that the result uses minimal space. I realise now in the OCFS2/BTRFS cases this isn't an issue since changing the data only unshares a small region of the data anyway. But that's quite a difficult thing to ask of any filesystem which implements reflink(), whereas saying "attribute changes do not trigger COW" (well maybe chown/chgrp do) is reasonable for any filesystems which can implement reflink(). -- Jamie