Re: [nfsv4] Review of draft-haynes-nfsv4-delstid-00

Trond Myklebust <trondmy@gmail.com> Tue, 24 July 2018 17:12 UTC

Return-Path: <trondmy@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 4E78D130F0D for <nfsv4@ietfa.amsl.com>; Tue, 24 Jul 2018 10:12:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 J0wsUUVo7cRm for <nfsv4@ietfa.amsl.com>; Tue, 24 Jul 2018 10:12:23 -0700 (PDT)
Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (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 45861130ED6 for <nfsv4@ietf.org>; Tue, 24 Jul 2018 10:12:23 -0700 (PDT)
Received: by mail-it0-x235.google.com with SMTP id g141-v6so4752684ita.4 for <nfsv4@ietf.org>; Tue, 24 Jul 2018 10:12:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version; bh=BYur6/5CahNjKjwtGuYOwbZdqxQY1b2gsF59NGNMdt4=; b=rEHWYvX7vnQQpFEo2zySrmLOOuktGs55yJZ4XdQvg7bKxLJaOHE573uSSlDpzI2ND8 XIvyYUzwU2IFAr6WZzQz+UNFX4shoMtuNkH+CEAX7bDSQkvm9AAxGvQcWWIjrhlFoVQJ OEyxX1JeqaasTbIu70WW1MUzsTlfOSKYu+kqymKwqE2OjyxHtl2zZ4Z5vXAiNIKNziKp bUtfDr4RybOR0Ht4cvRtbmqrgIZAL8zROfUffABmTCnlGIwzdkBlLktN+Ks4A9miujzf LdJjUmCXdGk65/m7gPXP6M+BQtDB/cMZCO+1xlz/ChMPYSikag+qTdBUFsURiLZOvfL1 QtPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version; bh=BYur6/5CahNjKjwtGuYOwbZdqxQY1b2gsF59NGNMdt4=; b=ZTgu4dgZ3kLwldJyAdGmgapccrQJrf5F8cljQj5CV2w/Mj08ZeVHmdyMOkO5e2gtH3 hm8RuwOCcFT8MGIxIv/jfO2frGVPP+tfcTh+oyngPN3NCNTQrUaP4D0NfgnMrCSXM/kh 5NfLMPdikXreKkWx3gYLbuoM045A7kf+RRXI9pCAdd9vqAWsioZSDjYzziyNnoGVy7OR Ujltsk73yaYDClffZJFkZ3/Qh9EO50d6GwLCljQ3hQrg+OeNClCtcpNw4LVdKGNBBzT0 EueBP55gCcQr1d9Y3ALP5nsWqscukBM3Tmj9HISK07+AZlnUQrllftyey2436zFcQt5J y13A==
X-Gm-Message-State: AOUpUlHmfWI0JXtOJH958RKFJlmQZwXDblD6JIG58zoK+mO845pJnvOo R0oNPjPFpbgJ+QumZLLQxw==
X-Google-Smtp-Source: AAOMgpdwbVhwPmRkpG11H6fXV8L8lLIr9bWoH6MyNuHsPmxQTK9ljbgazE/NDC7i1sh8WYL2NmBjag==
X-Received: by 2002:a24:670a:: with SMTP id u10-v6mr3733889itc.31.1532452342215; Tue, 24 Jul 2018 10:12:22 -0700 (PDT)
Received: from leira.trondhjem.org (50-36-91-56.alma.mi.frontiernet.net. [50.36.91.56]) by smtp.gmail.com with ESMTPSA id g6-v6sm1046672iti.0.2018.07.24.10.12.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 10:12:19 -0700 (PDT)
Message-ID: <529819b6fc0ab1e8fe9b7f664e6e4b387a8e01b5.camel@gmail.com>
From: Trond Myklebust <trondmy@gmail.com>
To: Tom Haynes <loghyr@gmail.com>, "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>
Cc: Dave Noveck <davenoveck@gmail.com>, NFSv4 <nfsv4@ietf.org>
Date: Tue, 24 Jul 2018 13:12:17 -0400
In-Reply-To: <071EA66F-40E1-4889-8717-2B8E9F4A6D38@gmail.com>
References: <CADaq8jdspqcMkpO=zoLGDWzn91m0oeca9HC2jUJ0ne=LnuLwNg@mail.gmail.com> <CAABAsM5UBw+wqLbVrKq5VO7TAj3AgAZX3jmk+cw2xmZc9BvBig@mail.gmail.com> <1315090456.28962271.1532428651492.JavaMail.zimbra@desy.de> <071EA66F-40E1-4889-8717-2B8E9F4A6D38@gmail.com>
Content-Type: multipart/alternative; boundary="=-O+jjMOwTEmjh/Hw+sACY"
X-Mailer: Evolution 3.28.4 (3.28.4-1.fc28)
Mime-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/YduBTcpKFF66RXlePj59WTu1o3w>
Subject: Re: [nfsv4] Review of draft-haynes-nfsv4-delstid-00
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.27
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: Tue, 24 Jul 2018 17:12:28 -0000

Hi Tigran,
I think both these proposals are interesting, but I agree with Tom that
there is a problem with any proposal that requires rewriting
applications in order to make use of the APIs being exposed. Unless you
are just going to use FATTR4_ACCESS_LATENCY in the same way that you
would use an 'online/offline' state variable, you would need to get
user or application level input in order to determine a latency
acceptance criterion. You would then need application policy about what
to do if the server exceeds that latency acceptance (e.g. due to tape
robot congestion or cloud archiving service level agreements)...
Ditto for the OPEN4_ONLINE_ONLY flag; that is not supported by any
POSIX API, so we'd also have to rewrite applications specifically for
that interface.
That said, both suggestions could be used to implement our use case, so
if you have a compelling use case that requires these enhanced APIs
then we can work with that.
Cheers   Trond
On Tue, 2018-07-24 at 08:17 -0700, Tom Haynes wrote:
> Hi Tigran,
> Thanks for the questions.
> 
> 
> 
> > On Jul 24, 2018, at 3:37 AM, Mkrtchyan, Tigran <
> > tigran.mkrtchyan@desy.de> wrote:
> > Hi Trond,
> > 
> > ----- Original Message -----
> > > From: "Trond Myklebust" <trondmy@gmail.com>
> > > To: "Dave Noveck" <davenoveck@gmail.com>
> > > Cc: "NFSv4" <nfsv4@ietf.org>, "Thomas Haynes" <
> > > loghyr@primarydata.com>
> > > Sent: Wednesday, May 30, 2018 5:56:44 PM
> > > Subject: Re: [nfsv4] Review of draft-haynes-nfsv4-delstid-00
> > > Hi Dave,
> > > 
> > > While read delegations may not allow the client to cache byte
> > > range locks,
> > > they do allow it to cache OPENs provided that the application
> > > only asks for
> > > a share lock of OPEN4_SHARE_DENY_NONE or OPEN4_SHARE_DENY_WRITE,
> > > in
> > > combination with OPEN4_SHARE_ACCESS_READ. See for instance:
> > > https://tools.ietf.org/html/rfc5661#section-10.4
> > > 
> > > Concerning your comments around the offline bit. I do agree that
> > > an open
> > > mode requesting that the server fail if the file is offline would
> > > be useful
> > > for a number of cases (e.g. when dealing with backup
> > > applications). One
> > > main use case for the offline bit is to support existing desktop
> > > file
> > > browsers that want to highlight files that are offline to ensure
> > > the user
> > > does not try to open them.
> > 
> > I very much like the idea of offline bit. However, for me, your
> > proposal doesn't go
> > deep enough. First of all, not all offline storage systems have a
> > similar latency.
> > A S3 storage may have couple of seconds, but with a tape archive
> > you can easily get
> > minutes, hours or, in extreme case, even days. Thus, if you are
> > introducing a new attribute,
> > may be instead of binary switch add something like an 'estimated
> > access latency',
> > with zero for online files and other values for offline files:
> > 
> > 
> > const FATTR4_ACCESS_LATENCY            = 83;
> > typedef nfstime4 fattr4_estimated_access_latency;
> > 
> > 
> > The value is a hint, of course.
> 
> I don’t think Linux has the concept of an offline file. Windows does,
> but it only has theboolean value.
> So either the client or Samba server would have to translate this
> range to a binary value?
> I’m not saying no, I’m asking how this would be used.
> Another thing here is that I tend to think not just in the access
> latency, but also in thecost of loading the file. I.e., if it is on-
> site and on a tape archive, I may have a low cost,but high latency to
> load the file. This is versus something in the cloud, which maybe
> high cost but low(er) latency.
> Perhaps my above question about how this would be used really
> reflects that thevalue is subjective.
> > Finally, an open flag OPEN4_ONLINE_ONLY will make life much simpler
> > for end-user applications.
> > A corresponding error like NFS4ERR_OFFLINE or NFS4ERR_DELAY will
> > tell client that it
> > have to explicitly ask for bringing files ONLINE. However, we our
> > old-good friend POSIX
> > will resist, as usual. O_NONBLOCK is not allowed for regular files
> > and EAGAIN is not
> > a valid error code for open call.
> 
> So the client blocks the open call until it succeeds? Yes, I
> understand this may not be allowed.
> 
> > BTW, how you want to propagate offline bit to a file browser?
> 
> I assume it is either an extended attribute or something that gets
> retransmitted over another protocol.
> I.e., in the case we have the Data Portal (translates NFSv3 or SMB to
> NFSv4) will use NFSv4 toget the attribute and then the Samba code
> will send the offline state over SMB to the client.
> 
> > Regards,
> >   Tigran.
> > 
> > 
> > > Concerning the use of bitmaps in open-support, the problem is
> > > that the OPEN
> > > flags are currently an unholy mixture of flags and bit fields (in
> > > the C
> > > language sense). For instance, the OPEN4_SHARE_ACCESS_WANT_* are
> > > mostly a
> > > bit field taking values between 0x0 and 0xFF, and so we require
> > > that
> > > extensions for new share want modes will be adding values
> > > starting at
> > > 0x06... Furthermore, not all servers currently support all the
> > > existing
> > > modes (e.g. OPEN4_SHARE_ACCESS_WANT_CANCEL), so we should require
> > > that
> > > clients be able to detect this.
> > > The same argument is true of the claim type: nobody currently
> > > implements
> > > CLAIM_DELEGATE_PREV or CLAIM_DELEG_PREV_FH, so any future client
> > > that wants
> > > to figure out if the server supports those modes cannot do so.
> > > Assuming
> > > that just because the server implements CLAIM_FH, then it must
> > > implement
> > > all the modes with values < CLAIM_FH is patently false.
> > > 
> > > Concerning your question around the time attribute proxying, the
> > > reason why
> > > we should add new attributes, is because the behaviour of SETATTR
> > > using
> > > these attributes differs from the behaviour when setting mtime
> > > and atime
> > > directly. In particular, the behaviour of the ctime is very
> > > different. In
> > > order to be able to emulate POSIX semantics on the client, we do
> > > not want
> > > the server to change the ctime at all when we set the atime when
> > > returning
> > > the delegation. If we're setting the mtime, we want the server to
> > > update
> > > the ctime if and only if the new mtime is more recent than the
> > > existing
> > > value for ctime.
> > > This behaviour should only be allowed if the client holds the
> > > required
> > > delegation type and uses these attributes. Otherwise, standard
> > > semantics
> > > apply when setting the mtime and atime using the existing
> > > time_access_set/time_modify_set attributes.
> > > 
> > > Cheers
> > >  Trond
> > > On Mon, 21 May 2018 at 13:10, David Noveck <davenoveck@gmail.com>
> > > wrote:
> > > 
> > > > I have read the document and believe all of the extensions
> > > > suggested in
> > > this document are worthy of serious consideration by the working
> > > group,
> > > but, as we are unsure which of these the working group will
> > > choose to
> > > pusue, I don't think we can be sure of the structure of the
> > > working group
> > > document(s) that will be pursued.  I hope we will get a better
> > > sense of
> > > that at IETF 102.
> > > 
> > > > There are a number of specific issues of presentation that I
> > > > want to call
> > > your attention to.   As these made it rather difficult to
> > > understand the
> > > various individual extensions proposed, I suggest that you take
> > > note of
> > > these in preparing further I-D versions.  Some of these might
> > > also be
> > > useful in preparing your presentation for IETF 102.
> > > 
> > > > There was a lot of uncetainty about features involving
> > > > delegations that
> > > results from confusing text that mentions "delegations" but in
> > > fact only
> > > refers to write delegations.  Note that read delegations do not
> > > give the
> > > client the ability to open the file on the client without
> > > reference to the
> > > server but much of the text assumes that returning any delegation
> > > will make
> > > it unnecessary to return an open stateid.
> > > > It is very confusing that section 2 includes two of your
> > > > extensions
> > > without clearly distinguishing between them.  Adding to the
> > > confusion is
> > > the fact that the motivation of the open support attribute is
> > > dependent on
> > > the added flags bits which appear later.  I suggest you give each
> > > of the
> > > proposed extensions its own section, including a statement of the
> > > motivation for it.  Note that section 4.1 is a good explanation
> > > of the need
> > > for the time-attribute proxying feature but it is hidden and
> > > appears after
> > > the feature is laid out.  The place for the motivation of a
> > > feature is near
> > > the beginning of the description that feature.   After all, you
> > > know why
> > > the feature is needed but you can't expect the reader to have the
> > > same
> > > insight, and it is unrealistic to assume he is going to
> > > assimilate the
> > > protocol details and then correlate them with text explaiing th
> > > motivation
> > > that appears later.
> > > > The material in sections 5 and 5.1 is distracting.   You need
> > > > to look at
> > > RFCs 8275 and 8276 as a model for dealing with XDR extension
> > > issues, rather
> > > than the pNFS RFCs.   I don't see the need for a consolidated XDR
> > > file such
> > > as is appropriate to a pNFS mapping type or a separate licensing
> > > section.
> > > 
> > > > With regard to the individual exensions, I have, in some cases,
> > > > issues
> > > with how you have chosen to do the feature while agreeing that
> > > these cover
> > > important issues that it is worthwhile to address:
> > > 
> > > > With regard to the offline file support, I don't agree with the
> > > assumption that the server will necessarily have to bring the
> > > file online
> > > in order to open it.  Also, requiring him to do a GETATTR in one
> > > compound
> > > and then decide whether to open the file adds to complexity.
> > >  Given that
> > > you are extending open, you should consider bits that indicate
> > > that an
> > > offline file is not to be opened, or that bringing the file
> > > online be
> > > deferred until the first IO operation.  I still think the
> > > attribute is
> > > useful but don't think it should be the only  piece of offline
> > > file support
> > > specified.
> > > > With regard to the open-support attribute. I like the general
> > > > idea.  It
> > > is certainly better than forcing the client to try various bits
> > > and deal
> > > with NOTSUPP errors.  However, I think that basing this on
> > > bitmaps adds
> > > unneded complexity, in that you need separate bit number
> > > definitions for
> > > each existing flag and have the task of adding a bit nmber
> > > whenever you
> > > extend the protocol by adding a flag.  It would be simpler for
> > > this
> > > attribute to parallel the current definition of open and use
> > > flags where
> > > OPEN uses flags.  Also, definition of bit numbers for
> > > combinations of flags
> > > (e.g. _NONE, _BOTH) probably will become unworkable if we add
> > > more bits to
> > > share and deny such as DELETE.
> > > > With regard to the time-attribute-proxying feature, I don't
> > > > understand
> > > why new attributes are needed rather than basing this on  setting
> > > the
> > > attributes that are being proxied.  One option that should be
> > > considered is
> > > extending the union time_how to provide for this case. I also
> > > have problems
> > > with requirements that SETATTR's be done the same in COMPOUND as
> > > the
> > > DELEGRETURN.  I'm not sure why this is needed.  If it is really
> > > necessary
> > > that setting of these attribute needs to be tightly bound to the
> > > delegation
> > > return, an extended delegation return operation should be
> > > considered.   If
> > > you do use SETATTRs, then the stateid would have to be that of
> > > the
> > > delegation.  Given what section 18.30 of RFC5661 currently says
> > > about the
> > > stateid in SETATTR, the very limited discussion of the stateid in
> > > that
> > > section would have to be extended.   The best way to do that
> > > would for the
> > > eventual RFC to include a new section essentially replacing
> > > section 18.30
> > > of RFC5661.
> > > 
> > > 
> > > > _______________________________________________
> > > > nfsv4 mailing list
> > > > nfsv4@ietf.org
> > > > https://www.ietf.org/mailman/listinfo/nfsv4
> > > 
> > > _______________________________________________
> > > nfsv4 mailing list
> > > nfsv4@ietf.org
> > > https://www.ietf.org/mailman/listinfo/nfsv4