Subject: error list analysis of draft-02-05

From: Spencer Shepler <[email-masked]>
Date: Mon, 12 Aug 2002 05:15:32 -0500

I have generated a table of NFS4ERR_* to operations to analyze the
latest draft to see what updates need to be made with respect to the
correct error listings.  Well, a few changes are needed.  

The table is located at:
http://www.nfsv4.org/rfc3010updates/draft-02-05/errormatrix.html

Here is my analysis and proposals.

Errors:
-------
NFS4ERR_RESTOREFH - this error is listed for the RESTOREFH operation
		    but no definition exists.  Anyone remember what
		    this was supposed to be?  If not, I propose we
		    remove it from the list of errors.

NFS4ERR_TOOSMALL/NFS4ERR_READDIR_NOSPC - These two errors are only
                    listed for the READDIR operation and used anywhere
                    else.  If there is no use for NFS4ERR_TOOSMALL
                    that can be defined, I propose that we
                    remove/deprecate the READDIR_NOSPC error.

NFS4ERR_NODEV - This error is not used in any of the operations.  If
		no use is found, I propose we remove it.

Operations:
-----------
ACCESS
	NFS4ERR_INVAL - should be listed since the access parameter
	has a set of flags defined and if the client specifies
	something undefined this error will be needed.

CLOSE
	NFS4ERR_GRACE - This error is listed but doesn't make sense.
	If the server is in the middle of a grace period, it shouldn't
	be able to refuse a CLOSE of a file that has been OPENed under
	reclaim.  Propose that it be removed.

	NFS4ERR_INVAL - The CLOSE operation takes a filehandle, seqid,
	and stateid.  There are errors that cover all of these and
	there isn't any need for INVAL for this operation.  Propose
	that it be removed.

CREATE
	NFS4ERR_DELAY - This error is absent.  Appears to be an
	oversite based on the usage of DELAY in other operations.
	Propose that it be added.

	NFS4ERR_NOTSUPP - NOTSUPP is for operations that are not
	supported and CREATE should not be on that list.  There is a
	specific error for object types that are not supported and
	INVAL is listed for anything that falls outside the range of
	defined types.  Propose that this error be removed.

	NFS4ERR_PERM - This error is not listed.  It is listed for
	NFSv3 and seems reasonable for v4 since the client is able to
	specify attributes and the setting of those on CREATE may
	require privilege.  Propose to add this error.

DELEGPURGE

	NFS4ERR_LEASE_MOVED/NFS4ERR_MOVED - these errors are not
	listed and it seems reasonable that they should be given the
	error defintions and the definition of the operation itself.
	Propose that they be added.

DELEGRETURN

	NFS4ERR_LEASE_MOVED/NFS4ERR_MOVED - same as for DELEGPURGE.
	Propose they be added.

	NFS4ERR_NOFILEHANDLE - this operation requires a current
	filehandle and therefore this error should be added.  Propose
	that it be added.

	NFS4ERR_NOTSUPP - it is possible that the server does not
	support delegations and therefore this operation should define
	NOTSUPP as an error return.  Propose that it be added.

	NFS4ERR_STALE - as with NOFILEHANDLE, this operation takes a
	filehandle.  Propose the error be added.

LOCKU

	NFS4ERR_STALE_CLIENTID - this operation does not directly take
	a clientid and therefore this error is incorrectly listed.
	Propose that it be removed from the list.

LOOKUPP

	NFS4ERR_INVAL - this operation only requires a current
	filehandle and errors exist for this.  Propose that INVAL be
	removed from the list of errors.

NVERIFY

	NFS4ERR_NOTSUPP - seems as though this error may have been
	listed at one point for the case that specified attributes
	were not supported.  There is a separate error for that and
	this now seems unappropriate since NVERIFY must be supported.
	Propose to remove this error.

OPEN

	NFS4ERR_INVAL - this error is not listed but there are many
	fields for this operation that are not handled under specific
	errors.  This should be listed if the client makes a mistake.
	Propose to add to list.

	NFS4ERR_ISDIR - this is listed but OPEN requires a directory
	for the current filehandle and an error is supplied for this
	case (NFS4ERR_NOTDIR).  Propose this error be removed.

	NFS4ERR_NOTSUPP - OPEN must be supported and there are errors
	for the cases where features are not supplied.  Propose this
	error be removed.

	NFS4ERR_PERM - Like CREATE, OPEN takes attributes which may
	require privilege to set.  Propose that it be added to the
	list.

	NFS4ERR_STALE - Seems obvious that this error should be
	listed.

OPENATTR

	NFS4ERR_DQUOT - Not listed and the OPENATTR operation may
	require allocation in the filesystem.  Propose it be listed.

	NFS4ERR_INVAL - this is listed but no fields exist that
	require its use.  Propose it be removed.

OPEN_CONFIRM

	NFS4ERR_BAD_STATEID - not listed but the operation takes a
	stateid.  Propose the error be added.

	NFS4ERR_GRACE - if the OPEN succeeded during the grace period,
	the OPEN_CONFIRM should as well.  Propose that this be added.

	NFS4ERR_INVAL - this is listed but there are no fields that
	require its use.  Other errors cover error paths.  Propose it
	be removed.

	NFS4ERR_NOENT - this is listed but as with GRACE, if the OPEN
	succeeded then OPEN_CONFIRM has no reason to return
	NOENT. Propose that this be removed.

	NFS4ERR_NOTSUPP - this operation must be supported.  Propose
	this error be removed.

	NFS4ERR_OLD_STATED/NFS4ERR_STALE_STATEID - operation takes a
	stateid and should be able to return these errors.  Propose
	they be added.

READ

	NFS4ERR_INVAL - there are no fields for the READ request that
	need this error.  If the offset is beyond eof or max filesize
	supported, the server should return a zero length response.
	If that is not acceptable, NFS4ERR_FBIG should be returned.
	Propose that this error be removed.

READDIR

	NFS4ERR_NOT_SAME - this error is listed and makes no sense.
	Propose it be removed.

	NFS4ERR_NOTSUPP - the READDIR operation must be supported and
	there is a specific error for attributes that are not
	supported.  Propose this error be removed from the list.

READLINK

	NFS4ERR_ISDIR - not listeda and should be if current
	filehandle is a directory.  Propose it be added.

REMOVE

	NFS4ERR_NOTSUPP - operation lists NOTSUPP but
	the operation must be supported and there are errors to cover
	the name construction issues.  Propose that this error be
	removed from REMOVE.

RENAME

	NFS4ERR_NOTSUPP - same as REMOVE

	NFS4ERR_XDEV - should be listed since it applies just as it
	does to LINK.  Propose it be added to the list.

RENEW

	NFS4ERR_INVAL - is listed but makes no sense for this
	operation.  Propose it be removed.

SETATTR

	NFS4ERR_NOTSUPP - operation must be supported and there are
	errors for unsupported attributes.  Propose this be removed
	from the list.

SETCLIENTID_CONFIRM

	NFS4ERR_INVAL - is listed but should not be.  Propose to
	remove it from list.

VERIFY

	NFS4ERR_NOTSUPP - as with NVERIFY, this should be removed.
	Propose just that.

RELEASE_LOCKOWNER

	NFS4ERR_GRACE - server should not reject a RELEASE_LOCKOWNER
	for a grace period.  Propose it be removed from the list.

CB_COMPOUND

	NFS4ERR_BADXDR/NFS4ERR_SERVERFAULT - should be added to list
	to match that of the underlying operations.

---

From: Mike Eisler <[email-masked]>
Date: Mon, 12 Aug 2002 08:58:01 -0700

Spencer Shepler wrote:
>                     remove it from the list of errors..

Its for the case when the compund proc hasn't done a savefh