From: Christoph Hellwig <hch@infradead.org>
To: Ben Myers <bpm@sgi.com>
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] commit_metadata export operation replacing nfsd_sync_dir
Date: Tue, 16 Feb 2010 17:06:45 -0500 [thread overview]
Message-ID: <20100216220645.GA24735@infradead.org> (raw)
In-Reply-To: <20100216210413.5694.88826.stgit@case>
This looks very good to me. A couple of tiny nitpicks below:
> +/*
> + * Commit metadata changes to stable storage. You pay pass NULL for dchild.
> + */
The dchild argument is gone in this version.
> + struct writeback_control wbc = {
> + .sync_mode = WB_SYNC_ALL,
> + .nr_to_write = 0, /* metadata only */
> + };
> + int error = 0;
> +
> + if (!EX_ISSYNC(fhp->fh_export))
> + return 0;
> +
> + if (export_ops->commit_metadata) {
> + error = export_ops->commit_metadata(inode);
> + } else {
> + error = sync_inode(inode, &wbc);
> + }
Maybe move the wbc declaration into the else branch here to keep
variables in the smallest possible scope.
> @@ -1199,7 +1204,7 @@ nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *resfhp,
> if (current_fsuid() != 0)
> iap->ia_valid &= ~(ATTR_UID|ATTR_GID);
> if (iap->ia_valid)
> - return nfsd_setattr(rqstp, resfhp, iap, 0, (time_t)0);
> + return nfsd_setattr(rqstp, resfhp, iap, 0, 0);
While this is a worthwhile cleanup I'd not put it into a patch that is
now entirely unrelated.
> + err = nfsd_create_setattr(rqstp, resfhp, iap);
>
> + /*
> + * nfsd_setattr already committed the child. Transactional filesystems
> + * had a chance to commit changes for both parent and child
> + * simultaneously making the following commit_metadata a noop.
> + */
> + err2 = nfserrno(commit_metadata(fhp));
> + if (err2)
> err = err2;
The if statement above seems rather minindented, possibly due to the
partial use of spaces instead of tabs.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-02-16 22:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-16 21:04 [PATCH 0/2] commit_metadata export operation v5 Ben Myers
2010-02-16 21:04 ` [PATCH 1/2] commit_metadata export operation replacing nfsd_sync_dir Ben Myers
2010-02-16 22:06 ` Christoph Hellwig [this message]
2010-02-16 21:04 ` [PATCH 2/2] xfs_export_operations.commit_metadata Ben Myers
2010-02-16 22:07 ` Christoph Hellwig
2010-02-17 0:29 ` Dave Chinner
2010-02-17 2:39 ` [PATCH 0/2] commit_metadata export operation v5 J. Bruce Fields
-- strict thread matches above, loose matches on Subject: below --
2010-02-17 20:05 [PATCH 0/2] commit_metadata export operation v6 Ben Myers
2010-02-17 20:05 ` [PATCH 1/2] commit_metadata export operation replacing nfsd_sync_dir Ben Myers
2010-02-11 22:04 [PATCH 0/2] commit_metadata export operation v4 Ben Myers
2010-02-11 22:05 ` [PATCH 1/2] commit_metadata export operation replacing nfsd_sync_dir Ben Myers
2010-02-12 14:23 ` Alex Elder
2010-02-12 17:31 ` Christoph Hellwig
2010-02-11 19:26 [PATCH 0/2] commit_metadata export operation v3 Ben Myers
2010-02-11 19:26 ` [PATCH 1/2] commit_metadata export operation replacing nfsd_sync_dir Ben Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100216220645.GA24735@infradead.org \
--to=hch@infradead.org \
--cc=bfields@fieldses.org \
--cc=bpm@sgi.com \
--cc=linux-nfs@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox