Subject: RE: [nfsv4] NFS4ERR_EXIST vs NFS4ERR_ISDIR

From: "Noveck, Dave" <[email-masked]>
Date: Fri, 6 Feb 2004 14:22:12 -0800

Peter Staubach wrote:
> Actually, the NFSv3 protocol does not restrict which errors could be
> returned from which operation.  There were lists associated with each
> operation, but they were intended to be the more common errors.  There
> is no reason that any specific error can not be returned, as long as it
> is one of the valid errors for the protocol.

That may be true of the error lists, but the following text from RFC1813
does specifically say that in the case we are talking about, you should
return EXIST and not ISDIR.  The fact that RFC1813 is, in general, not
inclined to limit you on the errors you return, makes the fact that it 
is so specific, sort of noteworthy.  Just like Rick, I wonder why (although
I may never find out).

      If the directory, to.dir, already contains an entry with
      the name, to.name, the source object must be compatible
      with the target: either both are non-directories or both
      are directories and the target must be empty. If
      compatible, the existing target is removed before the
      rename occurs. If they are not compatible or if the target
      is a directory but not empty, the server should return the
      error, NFS3ERR_EXIST.

-----Original Message-----
From: Peter Staubach [mailto:[email-masked]]
Sent: Friday, February 06, 2004 5:07 PM
To: [email-masked]
Cc: [email-masked]
Subject: Re: [nfsv4] NFS4ERR_EXIST vs NFS4ERR_ISDIR

[email-masked] wrote:
> Just an historical note... The section on returning NFS4ERR_EXIST for
> Rename for that case seems to be taken directly from RFC1813 for V3.
> 
> Does this imply that "real V3" servers return ISDIR and not EEXIST?
> 
> rick
> ps: I don't have a problem with returning EISDIR, just would like to
>     know if there was a reason V3 didn't allow it?
> 

Actually, the NFSv3 protocol does not restrict which errors could be
returned from which operation.  There were lists associated with each
operation, but they were intended to be the more common errors.  There
is no reason that any specific error can not be returned, as long as it
is one of the valid errors for the protocol.

		ps

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

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

---

From: Peter Staubach <[email-masked]>
Date: Fri, 06 Feb 2004 15:35:48 -0700

>       is a directory but not empty, the server should return the

Yes, so that would have been text that I would have written, so perhaps
I should remember...  :-)

That text was added because the Solaris UFS implementation returns
EEXIST.  It has been long enough that I don't recall why though,
perhaps POSIX or the SVID...

		ps