Subject: Re: [nfsv4] error on OPEN(CLAIM_DELEGATE_CUR)

From: "J. Bruce Fields" <[email-masked]>
Date: Mon, 4 Aug 2014 12:08:37 -0400

On Thu, Jul 31, 2014 at 03:30:20PM +0000, Adamson, Andy wrote:
> 
> On Jul 31, 2014, at 10:03 AM, Fred Isaman <[email-masked]> wrote:
> 
> > This popped up on the linux client, but is a general protocol question...
> > 
> > What is the client supposed to do when it receives an error (in this case ADMIN_REVOKED or BAD_STATEID) to an OPEN(CLAIM_DELEGATE_CUR) sent during delegation return?
> 
> 
> So this means that the server has thrown away or lost the delegation stateid that the client is attempting to return. If it was a WRITE delegation, then the client could have been doing local LOCKs OPENs and WRITEs independent of the server, and without the server enforcing the delegation, data corruption via another client is quite possible. I see no good way out of this situation for a WRITE delegation.

Seems like just another "oops, I lost my locks" situation, so should
probably be handled the same way?  (I think different implementations
send a SIGLOST and/or fail further IO on any affected file descriptors
with -EIO.)

--b.