Re: [nfsv4] Last call for RFC3530bis-13 (ends on Sept 2nd)

"J. Bruce Fields" <bfields@fieldses.org> Thu, 18 August 2011 15:18 UTC

Return-Path: <bfields@fieldses.org>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F406021F8B2A for <nfsv4@ietfa.amsl.com>; Thu, 18 Aug 2011 08:18:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.409
X-Spam-Level:
X-Spam-Status: No, score=-2.409 tagged_above=-999 required=5 tests=[AWL=0.190, BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VAhx9krivDuf for <nfsv4@ietfa.amsl.com>; Thu, 18 Aug 2011 08:18:02 -0700 (PDT)
Received: from fieldses.org (fieldses.org [174.143.236.118]) by ietfa.amsl.com (Postfix) with ESMTP id 49E5B21F86D0 for <nfsv4@ietf.org>; Thu, 18 Aug 2011 08:18:02 -0700 (PDT)
Received: from bfields by fieldses.org with local (Exim 4.72) (envelope-from <bfields@fieldses.org>) id 1Qu4My-00069f-1N; Thu, 18 Aug 2011 11:18:56 -0400
Date: Thu, 18 Aug 2011 11:18:56 -0400
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Message-ID: <20110818151855.GD21970@fieldses.org>
References: <E043D9D8EE3B5743B8B174A814FD584F1FE31B8B@TK5EX14MBXC124.redmond.corp.microsoft.com> <1313586323.4461.5.camel@lade.trondhjem.org> <47D601FA-792A-4FA3-9FC4-1298D38F9F84@netapp.com> <20110818150711.GC21970@fieldses.org> <1313680382.2566.12.camel@lade.trondhjem.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <1313680382.2566.12.camel@lade.trondhjem.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>
Subject: Re: [nfsv4] Last call for RFC3530bis-13 (ends on Sept 2nd)
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/nfsv4>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Aug 2011 15:18:04 -0000

On Thu, Aug 18, 2011 at 11:13:02AM -0400, Trond Myklebust wrote:
> On Thu, 2011-08-18 at 11:07 -0400, J. Bruce Fields wrote: 
> > On Wed, Aug 17, 2011 at 01:30:28PM -0500, Thomas Haynes wrote:
> > > 
> > > On Aug 17, 2011, at 8:05 AM, Trond Myklebust wrote:
> > > 
> > > > 
> > > > Does it contain any advice on the OPEN return value when applied to a
> > > > file that is not a regular file, symlink or directory? I'll be back in
> > > > active duty and able to check for myself tomorrow, but I thought I'd
> > > > draw it to your attention now.
> > > > 
> > > 
> > > I assume you are speaking with respect to the recent thread:
> > > 
> > > Re: [nfsv4] open() of device special files
> > > 
> > > And the answer would be no, we made no changes from 3530
> > > there.
> > > 
> > > You want to add text to the effect to return NFS4ERR_SYMLINK
> > > on an OPEN of an incorrect type?
> > 
> > Also not a spec issue unless this goes unfixed in our implementations,
> > but note rfc 5661 requires NFS4ERR_WRONG_TYPE in the case of OPEN of a
> > device (p. 455 in the OPEN implementation section, "If the component is
> > neither of those but not an ordinary file, the error NFS4ERR_WRONG_TYPE
> > is returned.")
> > 
> > One other 3530bis question:
> > 
> > I'm trying to decide where else the server could return NFS4ERR_SYMLINK.
> > 3530bis says COMMIT, LOOKUP, LOOKUPP, OPEN, READ, WRITE.
> > 
> > I wonder about:
> > 
> > 	CLOSE, OPEN_CONFIRM, LOCK, LOCKU, LOCKT: as with READ, WRITE,
> > 	and COMMIT, these cases where the client should have known
> > 	better, and we may as well allow (but not require)
> > 	NFS4ERR_SYMLINK, as we do NFS4ERR_ISDIR.  (Also NFS4ERR_SYMLINK
> > 	is on the error lists for some of these in rfc 5661).
> > 
> > 	CREATE, READDIR, REMOVE, RENAME, SECINFO, possibly some others:
> > 	currently require NFS4ERR_NOTDIR.  I wonder if NFS4ERR_SYMLINK
> > 	should also be allowed.  I guess these are also buggy-client
> > 	cases, so I think it's safely left up to the implementation
> > 	whether to return INVAL, NOTDIR, or SYMLINK.
> 
> I can live with those returning NFS4ERR_INVAL. Those are all cases where
> the error applies to an invalid object which was passed in the form of a
> filehandle. IOW: the client can and should know better.

Yeah, agreed.

(In fact, INVAL may be the preferred error--but as long as the operation
fails in these cases I think any reasonable error is fine.  E.g. the
linux server is currently going out of its way to map lower-level
symlink errors to INVAL in the above cases, and I don't see the point,
so I'm inclined to just delete that extra code.)

> > (And, a really nitty nit: why are the page numbers in the table of
> > contents at
> > 
> > 	http://tools.ietf.org/html/draft-ietf-nfsv4-rfc3530bis-13
> > 
> > off by one?)
> 
> Are they? They seem correct to me. Remember that RFCs list the page
> number at the bottom of the page and not the top.

Doh!

--b.