From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: i_version changes Date: Wed, 13 Feb 2008 16:36:04 -0500 Message-ID: <20080213213604.GB29590@fieldses.org> References: <20080210073041.GA23529@lst.de> <20080212200625.GE18625@fieldses.org> <20080213125214.GA12362@lst.de> <20080213202611.GM13462@fieldses.org> <43290.192.168.1.70.1202937559.squirrel@neil.brown.name> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , jean-noel.cordenner@bull.net, linux-fsdevel@vger.kernel.org To: NeilBrown Return-path: Received: from mail.fieldses.org ([66.93.2.214]:45150 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765492AbYBMVgK (ORCPT ); Wed, 13 Feb 2008 16:36:10 -0500 Content-Disposition: inline In-Reply-To: <43290.192.168.1.70.1202937559.squirrel@neil.brown.name> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Feb 14, 2008 at 08:19:19AM +1100, NeilBrown wrote: > On Thu, February 14, 2008 7:26 am, J. Bruce Fields wrote: > > > It's not OK to update it only sometimes. If updates are made while nfsd > > isn't running, those needed to be reflected in the change attribute, so > > the changes aren't missed when nfsd comes back up. > > For NFSD's needs, it is only necessary that changes in i_version that are > potentially visible over NFS actually be stored on disk. > > You could come up with an interface where NFSD sets a flag when it reads > i_version, and changes to the file only change i_version if the flag is > set (at which point the flag is cleared). > > This would give fully correct NFS semantics, and no overhead when NFS access > is not in use > > This flag would need to be stored in stable storage too, so probably easiest > to make it the least significant bit of i_version. > > Of course then the semantics of the new i_version are very different to > the old i_version, so maybe we need two fields in the inode.... Sure. I'd rather have a per-superblock "use i_version" bit than a per-inode "use i_version" bit, just for simplicity's sake, unless there's a really convincing case that it helps. --b.