Re: [PATCH] knfsd: nfsd: Handle ERESTARTSYS from syscalls.

Previous thread: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) by Bron Gondwana on Tuesday, June 17, 2008 - 2:00 am. (38 messages)

Next thread: [PATCH 0/12]: Proper compat WEXT support. by David Miller on Tuesday, June 17, 2008 - 3:52 am. (1 message)
To: Trond Myklebust <trond.myklebust@...>
Cc: Chuck Lever <chucklever@...>, Peter Staubach <staubach@...>, J. Bruce Fields <bfields@...>, <linux-nfs@...>, <linux-kernel@...>
Date: Tuesday, June 17, 2008 - 3:03 am

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
--

To: Neil Brown <neilb@...>
Cc: Trond Myklebust <trond.myklebust@...>, Chuck Lever <chucklever@...>, Peter Staubach <staubach@...>, <linux-nfs@...>, <linux-kernel@...>
Date: Wednesday, June 18, 2008 - 11:59 am

OK. Want to send a replacement patch?

--b.
--

Previous thread: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) by Bron Gondwana on Tuesday, June 17, 2008 - 2:00 am. (38 messages)

Next thread: [PATCH 0/12]: Proper compat WEXT support. by David Miller on Tuesday, June 17, 2008 - 3:52 am. (1 message)