Re: [nfsv4] New attributes was Re: Can NFSv4.2 operations be optional on a per server file system basis?

David Noveck <davenoveck@gmail.com> Wed, 10 November 2021 11:13 UTC

Return-Path: <davenoveck@gmail.com>
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 F34323A0DF3 for <nfsv4@ietfa.amsl.com>; Wed, 10 Nov 2021 03:13:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 60pFo-fLz3xN for <nfsv4@ietfa.amsl.com>; Wed, 10 Nov 2021 03:13:19 -0800 (PST)
Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CE96B3A0DF2 for <nfsv4@ietf.org>; Wed, 10 Nov 2021 03:13:18 -0800 (PST)
Received: by mail-ed1-x52a.google.com with SMTP id ee33so8978858edb.8 for <nfsv4@ietf.org>; Wed, 10 Nov 2021 03:13:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rfAIyIEB5s32dovinWT7axBI9FG3XDwtuBFnrgAHssQ=; b=VVjMUvKRS3pR4sqKFo+91K9hyXnpty+Huv9Ni+JwAdaMq3Wnsrglv8016MRYs05HS1 u4+d1wQhXyRzSDRVlWgijFayU9ns8jo7BwiCag8bemsPyltK85bXbwSKrGetlQXufAAf 1Dll16sfwTYK2f+n4nl/vFezHpYR10NvmgdJHu1pFd8UCKa/8pw62nLkoO6fb0sSAmSj xKzFi+0+1VVaj4axpJ8Dp68mKaDlPm5IFlD2jw1DtfF7XCmbxxeDPJCB/joE2vVUiD8T c1g9aoC+Orf7BYWxcjdKyZfQ8aB3kj9qExA91wVaL7f1ap7j+0/Xswp3C5ByaoopUI8g jqRg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rfAIyIEB5s32dovinWT7axBI9FG3XDwtuBFnrgAHssQ=; b=ebnWId2t+PKZsBH5UGnqfPxbd0tSE6PGjZ3xpy5N62KZfxhwoJorO4mnkydpzqxKAS Ll8dJYQgQpDnlMr5ealyFWoWggfvh4LHvRy5R6Ts1YX5u3vP3NSCtmKUvvNEMazxgFbz EAGWk3aVJEetDRhes5Lx4mUDcw/OuAKlT99+xXdKTP6HpMVUEXBPZlcOfEt+5HjMSYSG KlWlHXUo/ZzABqDzPi11HpBYELAmHIyFpCmqN2/CTO5SeqgoUD3fAOK4n5GkHw/Hx56N boWCactMDMek4KTE4D6sXCJjpGXPwJprwIpikP6zU0qlv/kZhXBtQ+V/NL+ahMneBtAC 4p2g==
X-Gm-Message-State: AOAM533jpZJeEHj4qSkLApFnya7rdeu9CLWNo2QFw83DLMwtzLO+SxeS 8+4SApPzouVDcyUVyg4Zhy2rojFFtK8S/aA+hN8=
X-Google-Smtp-Source: ABdhPJwUk5S3Hrv5WsOIU/humBpkgpeovp+2zvUEx/9gRA8PzS+qREP9k9zzJwqKDg3YSEZZxGpA5KZw5ahI2w5TYA0=
X-Received: by 2002:a05:6402:2155:: with SMTP id bq21mr20086177edb.181.1636542796559; Wed, 10 Nov 2021 03:13:16 -0800 (PST)
MIME-Version: 1.0
References: <YQXPR0101MB0968D58C78D6E9ACBF7B8A3FDDB49@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <683B4D58-BFDF-465D-9E77-607819354EAA@gmail.com> <YQXPR0101MB0968AE1F6DD2D47EC458B7D7DDB49@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <CADaq8jcN5tv7RMOY=_1BktUsWkqEmUy-w2aygiURBNZC9LBPDQ@mail.gmail.com> <YQXPR0101MB09684B8F12901E7B0A796A97DDB99@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <20211019180511.GA18024@fieldses.org> <YQXPR0101MB0968B884DF6F28FFB3B5DCA2DDBE9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <E121A27A-7D25-4E86-B079-9FD4DE2BEEFA@gmail.com> <20211021021834.GB11612@fieldses.org> <CADaq8jd-YHPK400UnPPUyBB8mV-pVUJgC4yTwZu90Qmauxh9aQ@mail.gmail.com> <FA61F429-EECE-44F1-876D-91B912750F8A@gmail.com> <YQXPR0101MB09684DD5D9FC42552F2DB9E8DD8E9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <YQXPR0101MB09684DD5D9FC42552F2DB9E8DD8E9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
From: David Noveck <davenoveck@gmail.com>
Date: Wed, 10 Nov 2021 06:13:06 -0500
Message-ID: <CADaq8jfdKuuUn-pzMVeDr6=9W5oNeGkj6mqMB1Ukr5xauTC0zQ@mail.gmail.com>
To: Rick Macklem <rmacklem@uoguelph.ca>
Cc: Thomas Haynes <loghyr@gmail.com>, "J. Bruce Fields" <bfields@fieldses.org>, NFSv4 <nfsv4@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000c79fa05d06d50f4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/ljeJXThTsTMgVs0jDkaFW9gahNo>
Subject: Re: [nfsv4] New attributes was Re: Can NFSv4.2 operations be optional on a per server file system basis?
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 10 Nov 2021 11:13:24 -0000

On Fri, Nov 5, 2021, 7:19 PM Rick Macklem <rmacklem@uoguelph.ca> wrote:

> Thomas Haynes wrote:
> > On Oct 20, 2021, at 10:02 PM, David Noveck wrote:
> >
> >> Section 15.1.1.5 is a problem, although, as Bruce points out, it may
> not be
> >> problem returning NOTSUPP in practice.
> >
> >
> > Perhaps the solution is to add a per-file system attribute to state
> whether
> > or not it supports the optional feature.
> Although I still feel that an error reply is the more "natural fit" for
> this
> issue, I am not against a new attribute.
> There are also several other new attributes I think might be useful.
> Here's my current list:
> (All would be read-only, per file system attributes)
>

We could add these as optional extensions to v4.2.  Adding a single
attribute is probably not worth it, but, since I expect these to be
non-controversial doing them as a single document would not be a lot of
work.


> counted word array (like supported_attrs) - Optional operations
>     supported by file system (a bit for each operation, based on
>     operation number). Still could be useful, even if a server reply
>     error for "per file system support" is agreed upon.
>

Agree.

>
> uint64_t - minimum unallocated hole size - useful for Seek and
>     maybe Allocate, Deallocate. (FreeBSD has a pathconf variable
>     called _PC_MIN_HOLE_SIZE, where
>     0 - not supported
>     1 - supported, but no fixed granularity
>     > 1 - smallest size of block that might not be allocated.


Good idea.  The natural tendency is to assume that this value matches that
of your local file system so it is good to provide the true value.

>
> uint64_t - largest extended attribute size
>     (I am planning on a separate post w.r.t. large extended attributes.)
>

I'd like to see that post.   If that post makes this attribute
controversial, you have the option of splitting it out and dealing with it
in a separate document.


> boolean - monotonically increasing directory offset cookie
>     This could be useful for client side directory caching and
>     client implementation of directory delegations.
>

Do you really mean "could" or is "would" more appropriate?

>
I'm already planning on new descriptions of directory delegation and
notification for rfc5661bis.  As I think about that, I will come up with my
own opinion on the could/would question.


> boolean - server is doing mandatory byte range locking
>     This is needed for a client to correctly do file caching when
>     a server enforces mandatory byte range locking.
>

That's a longstanding need.  It would be good to address it.


> What do others think?
>

Once an I-D is out, you may get requests for additions.  In general that is
OK, but you have to be prepared to say "no" to ideas which might interfere
with quick adoption by generating controversy.

>
> rick
>
>
> I'm thinking about updating this definition in rfc5661bis-03 together with
> dealing with a bunch of the remaining erratta reports and a few updates to
> the security discussion to respond to the changes in security-03.
> I would submit this right after security-03, even though the big split up
> of the bis is still a ways in the future.
>
>  I think we can spend a few minutes discussing this at the meeting next
> week
>
>
>
> On Wed, Oct 20, 2021, 10:18 PM J. Bruce Fields <bfields@fieldses.org
> <mailto:bfields@fieldses.org>> wrote:
> On Wed, Oct 20, 2021 at 06:50:29PM -0700, Thomas Haynes wrote:
> > Honestly I went with what I *thought* I intended. The best supporting
> > evidence is here:
> >
> > 15.1.1.5.  NFS4ERR_NOTSUPP (Error Code 10004)
> >
> >    Operation not supported, either because the operation is an
> >    OPTIONAL one and is not supported by this server or because the
> >    operation MUST NOT be implemented in the current minor version.
> >
> > Which implies that the if OPTIONAL the operation is either entirely
> > supported by the server or not.
> >
> > What is a client supposed to do if it tries ALLOCATE and the server
> > accepts it -- it tries again and the server replies NFS4ERR_NOTSUPP.
>
> Return 0 to the application in the first case, and ENOTSUP in the
> second?  Is that a problem?
>
> > Is the support based on time of day? Did something change on the
> > server?
> >
> > You and I may know it is by filesystem, by how is that exposed to the
> > client?
>
> Unless the client's trying to do some optimization, as in Rick's case,
> it doesn't sound likely to cause a problem.
>
> I could see how EINVAL could cause practical problems, though.  E.g. an
> application probably knows how to handle NOTSUPP--it can fall back on
> writing zeroes, or something.  EINVAL, though, sounds like something's
> just broken, and it's not clear how to recover.
>
> Ditto a tar application getting NOTSUPP on getxattr.
>
> You're probably right on the letter of the spec.
>
> But we definitely need a way to indicate these features aren't supported
> on a per-filesystem basis, and it sounds like NFS4ERR_NOTSUPP is likely
> to work in practice, so maybe just going with that is the least bad
> option....
>
> --b.
>
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org<mailto:nfsv4@ietf.org>
> https://www.ietf.org/mailman/listinfo/nfsv4
>
>