mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Chuck Lever <chucklever@gmail.com>,
	Peter Staubach <staubach@redhat.com>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] knfsd: nfsd: Handle ERESTARTSYS from syscalls.
Date: Tue, 17 Jun 2008 17:03:01 +1000	[thread overview]
Message-ID: <18519.24997.34761.283298@notabene.brown> (raw)
In-Reply-To: message from Trond Myklebust on Monday June 16

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.

Thanks,
NeilBrown

  parent reply	other threads:[~2008-06-17  7:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080613213759.26929.patches@notabene>
2008-06-13 11:41 ` 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 [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=18519.24997.34761.283298@notabene.brown \
    --to=neilb@suse.de \
    --cc=bfields@fieldses.org \
    --cc=chucklever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®