[RFC PATCH 2/2] xfs_export_operations.commit_metadata
Christoph Hellwig
hch at infradead.org
Wed Feb 10 04:11:30 CST 2010
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.
More information about the xfs
mailing list