From: Christoph Hellwig <hch@infradead.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: "Dr. J. Bruce Fields" <bfields@fieldses.org>, linux-nfs@vger.kernel.org
Subject: Re: nfsd: Replace nfsd_sync() with vfs_fsync() and vfs_fsync_range()
Date: Fri, 29 Jan 2010 15:50:22 -0500 [thread overview]
Message-ID: <20100129205022.GA14449@infradead.org> (raw)
In-Reply-To: <1264796353.3644.4.camel@localhost>
On Fri, Jan 29, 2010 at 03:19:13PM -0500, Trond Myklebust wrote:
> From: Trond Myklebust <Trond.Myklebust@netapp.com>
>
> Currently, the nfs server holds the inode->i_mutex across both the
> filemap_write_and_wait() call and the fsync() call itself. However we know
> that filemap_write_and_wait() is already safe against livelocks, so we only
> need to hold the mutex across the fsync() call.
>
> Fix this by reusing vfs_fsync(), which already does the right thing.
> Also make sure that we use vfs_fsync_range() in the COMMIT operation, to
> improve the efficiency for clients that do specify a range.
I already sent a patch to replace nfsd_sync with it that should be
queued up. We can't use vfs_fsync for nfsd_sync_dir as we're already
holding i_mutex when calling it. The vfs_fsync_range optimizations
seems like something that should be applied ontop, though.
next prev parent reply other threads:[~2010-01-29 20:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-29 20:19 nfsd: Replace nfsd_sync() with vfs_fsync() and vfs_fsync_range() Trond Myklebust
2010-01-29 20:35 ` Trond Myklebust
2010-01-29 20:44 ` [PATCH v2] " Trond Myklebust
2010-01-29 20:50 ` Christoph Hellwig [this message]
2010-01-29 20:57 ` Trond Myklebust
2010-01-29 21:18 ` nfsd: Use vfs_fsync_range() in nfsd_commit Trond Myklebust
2010-01-29 21:27 ` Christoph Hellwig
2010-01-29 21:39 ` Trond Myklebust
2010-01-29 23:58 ` Dr. J. Bruce Fields
2010-03-17 19:08 ` Jeff Layton
[not found] ` <20100317150813.43815b5a-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-03-17 19:35 ` Trond Myklebust
2010-01-29 21:44 ` [PATCH v4] " Trond Myklebust
2010-01-29 23:53 ` Dr. J. Bruce Fields
2010-01-29 23:54 ` Dr. J. Bruce Fields
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=20100129205022.GA14449@infradead.org \
--to=hch@infradead.org \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/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