Subject: CLOSE does not list INVAL as error

From: Spencer Shepler <[email-masked]>
Date: Thu, 5 Sep 2002 10:03:25 -0500

It has been pointed out to me that CLOSE does not list INVAL as an
error return and needs it for the case that CLOSE is given a
filehandle that is not a regular file and not a directory
(e.g. symlink as an example).

-- 
Spencer

---

From: Mike Eisler <[email-masked]>
Date: Thu, 05 Sep 2002 10:21:49 -0700

For the same reason, OPEN_CONFIRM needs to list INVAL

Also, if the server issues a CB operation with a non-regular file, shouldn't
INVAL or ISDIR be returned?

---

From: Spencer Shepler <[email-masked]>
Date: Thu, 5 Sep 2002 13:42:21 -0500

> For the same reason, OPEN_CONFIRM needs to list INVAL

yes.  Actually, in reviewing the error list for this
filehandle/file-type mismatch, I see the need to add NFS4ERR_INVAL to
the following operations.

CLOSE
DELEGRETURN
OPEN_CONFIRM
READ

Unless I hear otherwise, I will make these changes this afternoon.

> INVAL or ISDIR be returned? 

Actually, since the client is under no obligation to track filehandles
for anything other than delegations it currently holds, I would expect
the client to return the error NFS4ERR_BADHANDLE in the case where the
server has made a type mismatch or is issuing a CB_* call with a
filehandle for which the client no longer holds a delegation.

Note to implementors, make sure you handle this case of receiving
BADHANDLE.  It can cause some interesting problems when the server
isn't prepared for the error return. 

-- 
Spencer