Subject: [nfsv4] Error returns

From: Fredric Isaman <[email-masked]>
Date: Wed, 15 Dec 2004 11:45:24 -0500 (EST)

I noticed two cases where the RFC seems to state different error returns
in different places for the same event, and was wondering if I could get
some clarification.

Regarding an OPEN with a share conflict:
Sect 8.9 -
      if ((request.access & file_state.deny)) ||
            (request.deny & file_state.access))
                    return (NFS4ERR_DENIED)

Sect 14.2.16 -
"In the case that there is a existing SHARE reservation that conflicts
with the OPEN request, the server returns the error NFS4ERR_SHARE_DENIED."

Regarding a READ/WRITE that conflicts with a share reservation:
Sect 8.1.4 -
"the server must verify that the access mode allows writing and return an
NFS4ERR_OPENMODE error if it does not"

Sect 14.2.16 -
"If the requester is not authorized to READ or WRITE (depending on the
share_access value), the server must return NFS4ERR_ACCESS."

	Thanks,
	Fred

_______________________________________________
nfsv4 mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/nfsv4

---

From: "Noveck, Dave" <[email-masked]>
Date: Wed, 15 Dec 2004 20:58:23 -0500

> with the OPEN request, the server returns the error NFS4ERR_SHARE_DENIED."

I believe SHARE_DENIED was a late addition (previously DENIED was used for
both this and denial because of a byte-range conflict).  So my guess is that
14.2.16 is correct and that 8.9 was just not updated to match.  Anybody else
know diferent (or the same)?

> NFS4ERR_OPENMODE error if it does not"

If I, for example, open for read and then try to do a write using that stateid,
whether I (the principal) can write to that file or not, OPENMODE is
returned.

> share_access value), the server must return NFS4ERR_ACCESS."

If I try to open for write and am not allowed to write that file, ACCESS
is returned.

These are different situations.