All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Chuck Lever <chucklever@gmail.com>,
	Peter Staubach <staubach@redhat.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] knfsd: nfsd: Handle ERESTARTSYS from syscalls.
Date: Wed, 18 Jun 2008 11:59:26 -0400	[thread overview]
Message-ID: <20080618155926.GA25297@fieldses.org> (raw)
In-Reply-To: <18519.24997.34761.283298-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>

On Tue, Jun 17, 2008 at 05:03:01PM +1000, Neil Brown wrote:
> On Monday June 16, trond.myklebust@fys.uio.no wrote:
> > On Mon, 2008-06-16 at 11:09 -0400, Chuck Lever wrote:
> > 
> > > I think an error reply is much better than no reply in nearly every
> > > case.  NFS3ERR_JUKEBOX/NFS4ERR_DELAY is an interesting idea, but
> > > something else again will probably be required for v4.1 with sessions.
> > 
> > NFS3ERR_JUKEBOX/NFS4ERR_DELAY may be inappropriate if the nfs daemon has
> > already started handling the RPC call, since you may be interrupting a
> > non-idempotent operation.
> 
> If the filesystem allows you to interrupt a non-idempotent operation
> part way through, then the filesystem is doing something very wrong.
> 
> The observed behaviour is that multiple 32K writes are outstanding
> (in different nfsd threads) when a signal is delivered to each nfsd.
> 
> OCFS2 appears to be serialising these writes.
> 
> One of the writes completes returning a length that is less than 32K.
> This length is returned to the client.  A quick look at the client
> code suggests that it complains with a printk, and tries to write the
> remainder, which seems correct.
> 
> The other writes all complete with ERESTARTSYS.  Presumably they
> haven't started at all.  If they had, you might expect a partial
> return from them too.
> 
> So far, what OCFS2 is doing seems credible and doesn't leave us in an
> awkward position with respect to incomplete idempotent operations.
> 
> I cannot be certain, but I'm willing to believe that OCFS2 only
> returns ERESTARTSYS when the operation hasn't been performed at all
> (or has been wound-back to the starting condition).
> 
> I agree that NFS3ERR_JUKEBOX is more appropriate than no reply, but I
> don't think there is any reason to suspect that will not be
> sufficient.

OK.  Want to send a replacement patch?

--b.

WARNING: multiple messages have this Message-ID (diff)
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Chuck Lever <chucklever@gmail.com>,
	Peter Staubach <staubach@redhat.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] knfsd: nfsd: Handle ERESTARTSYS from syscalls.
Date: Wed, 18 Jun 2008 11:59:26 -0400	[thread overview]
Message-ID: <20080618155926.GA25297@fieldses.org> (raw)
In-Reply-To: <18519.24997.34761.283298@notabene.brown>

On Tue, Jun 17, 2008 at 05:03:01PM +1000, Neil Brown wrote:
> On Monday June 16, trond.myklebust@fys.uio.no wrote:
> > On Mon, 2008-06-16 at 11:09 -0400, Chuck Lever wrote:
> > 
> > > I think an error reply is much better than no reply in nearly every
> > > case.  NFS3ERR_JUKEBOX/NFS4ERR_DELAY is an interesting idea, but
> > > something else again will probably be required for v4.1 with sessions.
> > 
> > NFS3ERR_JUKEBOX/NFS4ERR_DELAY may be inappropriate if the nfs daemon has
> > already started handling the RPC call, since you may be interrupting a
> > non-idempotent operation.
> 
> If the filesystem allows you to interrupt a non-idempotent operation
> part way through, then the filesystem is doing something very wrong.
> 
> The observed behaviour is that multiple 32K writes are outstanding
> (in different nfsd threads) when a signal is delivered to each nfsd.
> 
> OCFS2 appears to be serialising these writes.
> 
> One of the writes completes returning a length that is less than 32K.
> This length is returned to the client.  A quick look at the client
> code suggests that it complains with a printk, and tries to write the
> remainder, which seems correct.
> 
> The other writes all complete with ERESTARTSYS.  Presumably they
> haven't started at all.  If they had, you might expect a partial
> return from them too.
> 
> So far, what OCFS2 is doing seems credible and doesn't leave us in an
> awkward position with respect to incomplete idempotent operations.
> 
> I cannot be certain, but I'm willing to believe that OCFS2 only
> returns ERESTARTSYS when the operation hasn't been performed at all
> (or has been wound-back to the starting condition).
> 
> I agree that NFS3ERR_JUKEBOX is more appropriate than no reply, but I
> don't think there is any reason to suspect that will not be
> sufficient.

OK.  Want to send a replacement patch?

--b.

  parent reply	other threads:[~2008-06-18 15:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080613213759.26929.patches@notabene>
2008-06-13 11:41 ` [PATCH] knfsd: nfsd: Handle ERESTARTSYS from syscalls NeilBrown
2008-06-13 11:42 ` NeilBrown
2008-06-14 17:11   ` J. Bruce Fields
2008-06-16 12:39   ` Peter Staubach
2008-06-16 15:09     ` Chuck Lever
2008-06-16 16:54       ` Trond Myklebust
2008-06-16 18:13         ` Jeff Layton
2008-06-17  7:03         ` Neil Brown
     [not found]           ` <18519.24997.34761.283298-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-06-18 15:59             ` J. Bruce Fields [this message]
2008-06-18 15:59               ` 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=20080618155926.GA25297@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chucklever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=staubach@redhat.com \
    --cc=trond.myklebust@fys.uio.no \
    /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.