Subject: what is a server to do... (current filehandle != file/stateid)

From: Spencer Shepler <[email-masked]>
Date: Thu, 23 Jan 2003 13:31:27 -0600

So it is possible that a client makes a mistake and sends over a
request such that the current filehandle does not match the
file/stateid for a particular operation.  What should a server do?

Our server is currently returning NFS4ERR_BAD_STATEID.  At one point
this seemed appropriate since the client had just made a mis-match
error in constructing its request.

The alternate choice is to have the server return another error.
NFS4ERR_INVAL seems most appropriate since we don't have a
NFS4ERR_FILEHANDLE_STATEID_MISMATCH error.  The implication in
returning NFS4ERR_INVAL is that the server will need to bump the
sequence id.  This seems odd to me since there is a mismatch error in
the request but I am not wedded to one method or the other.

The operations that would have this check all have NFS4ERR_INVAL
available to them and obviously not all have to deal with incrementing
the sequence id.  CLOSE, DELEGRETURN, LOCK, LOCKU, OPEN_CONFIRM,
OPEN_DOWNGRADE, READ, SETATTR, WRITE

Opinions?

-- 
Spencer