All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: bpm@sgi.com, linux-nfs@vger.kernel.org
Subject: Re: [RFC PATCH 4/4] If 'wsync' pass datasync=1 to vfs_fsync().
Date: Thu, 04 Feb 2010 13:52:07 -0500	[thread overview]
Message-ID: <1265309527.3317.25.camel@localhost> (raw)
In-Reply-To: <20100204184040.GA15442@infradead.org>

On Thu, 2010-02-04 at 13:40 -0500, Christoph Hellwig wrote: 
> On Thu, Feb 04, 2010 at 01:38:00PM -0500, Trond Myklebust wrote:
> > > Indeed, both write_inode_now and vfs_fsync will also cause data to
> > > be written.  But my understanding of nfsd is that we manage the data
> > > writeout separately anyway and we care about the metadata here, which
> > > the placement of these calls would suggest:
> > > 
> > > 	- nfsd_setattr for attribute updates
> > > 	- nfsd_create for creating a new file (of any type)
> > > 	- nfsd_link for adding a new link
> > 
> > Yes. Most operations in NFS are required to be synchronous (the only
> > exception being "unstable" write requests), and so those
> > fsync/write_inode_now calls are there in order to ensure that the
> > metadata and/or directory contents that were changed hits the disk
> > before the RPC call completes.
> 
> Yeah.  But currently both the fsync and write_inode_now calls will force
> those unstable writes to disk.  I'm not sure if that is an intentional
> or unintentional side-effect of those metadata operations.

Syncing the unstable writes before the client sends a COMMIT request is
completely unnecessary. If we can avoid that, then that might indeed
give a performance boost for some workloads.

Cheers
  Trond

  reply	other threads:[~2010-02-04 18:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 23:44 [RFC PATCH 0/4] wsync export option Ben Myers
2010-02-03 23:44 ` [RFC PATCH 1/4] Add 'wsync' " Ben Myers
2010-02-03 23:44 ` [RFC PATCH 2/4] Add datasync argument to nfsd_sync_dir() Ben Myers
2010-02-03 23:44 ` [RFC PATCH 3/4] If 'wsync' call vfs_fsync() instead of write_inode_now() Ben Myers
2010-02-03 23:44 ` [RFC PATCH 4/4] If 'wsync' pass datasync=1 to vfs_fsync() Ben Myers
2010-02-04 15:19   ` Christoph Hellwig
2010-02-04 17:20     ` bpm
2010-02-04 18:30       ` Christoph Hellwig
2010-02-04 18:38         ` Trond Myklebust
2010-02-04 18:40           ` Christoph Hellwig
2010-02-04 18:52             ` Trond Myklebust [this message]
2010-02-03 23:47 ` [ RFC PATCH 5/4 ] Add wsync export option to nfs-utils bpm
2010-02-03 23:58 ` [RFC PATCH 0/4] wsync export option Trond Myklebust
2010-02-04 15:21   ` Christoph Hellwig
2010-02-04 15:30 ` Christoph Hellwig
2010-02-04 15:30   ` Christoph Hellwig
2010-02-04 18:15   ` bpm
2010-02-04 18:15     ` bpm
2010-02-04 18:39     ` Christoph Hellwig
2010-02-04 18:39       ` Christoph Hellwig

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=1265309527.3317.25.camel@localhost \
    --to=trond.myklebust@netapp.com \
    --cc=bpm@sgi.com \
    --cc=hch@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.