xfs
[Top] [All Lists]

Re: [RFC PATCH 2/2] xfs_export_operations.commit_metadata

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: [RFC PATCH 2/2] xfs_export_operations.commit_metadata
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 10 Feb 2010 05:11:30 -0500
Cc: linux-nfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20100210090750.GB21875@xxxxxxxxxxxxx>
References: <20100210003220.6021.74943.stgit@case> <20100210003337.6021.10942.stgit@case> <20100210090750.GB21875@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Wed, Feb 10, 2010 at 04:07:50AM -0500, Christoph Hellwig wrote:
> > +                   /*
> > +                    * AFAICS the child is always modified after the parent
> > +                    * in nfsd so should always have a larger lsn.
> > +                    */
> > +                   if (c_xip->i_itemp->ili_last_lsn > force_lsn) {
> > +                           force_lsn = c_xip->i_itemp->ili_last_lsn;
> > +                   } else {
> > +                           force_lsn = 0; /* whole thing */
> > +                   }
> 
> I wouldn't rely on that and always take the larger one.

Or we could use that fact for making the prototype saner:

 - the commit_metadata only takes a single inode to force out
 - we make sure to always call in on the child first.  For any
   log based filesystem that will force the parent update, too.
 - we then call it on the parent, which will be a no-op and thus
   fast for a log based filesystem, but still provide a fallback
   if that is not the case.

<Prev in Thread] Current Thread [Next in Thread>