Re: [nfsv4] Server-side copy question
Olga Kornievskaia <aglo@citi.umich.edu> Wed, 25 October 2017 13:28 UTC
Return-Path: <olga.kornievskaia@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 C64361384B2 for <nfsv4@ietfa.amsl.com>; Wed, 25 Oct 2017 06:28:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.7
X-Spam-Level:
X-Spam-Status: No, score=-1.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.199, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no 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 ZmXKKvIUwzRX for <nfsv4@ietfa.amsl.com>; Wed, 25 Oct 2017 06:28:44 -0700 (PDT)
Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com [IPv6:2607:f8b0:400c:c08::22a]) (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 5166F1375C9 for <nfsv4@ietf.org>; Wed, 25 Oct 2017 06:28:44 -0700 (PDT)
Received: by mail-ua0-x22a.google.com with SMTP id l40so17796817uah.2 for <nfsv4@ietf.org>; Wed, 25 Oct 2017 06:28:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=fuMxDUAbf43Y/mtoSLcRFxim2yHtuVzh11XrDpqVUIc=; b=XJ9UJ6GcOWiZDnCz3zUpgBYWeBEZ59N7oJNVp1e26fTyho82wZLzdE66spS7Fg5SlU jFgOVBnBaLXfHpTkuAY57uinIG0b9M2GU+mkGl93UQyBLY1JSSscGvEXgacFzkFYVUQ+ JEnilzAiN1BaMbgWzAxNrO9vkOG7jBki4FDSM33enuCo79BGokTMe08UKQDbq3Dz4RRf pWC/NnMtO0f2vIbj/kfRYfubjZBkI7eewQIGSltzppwTCRr3k1jCqEnHGjNFKyZYUfeM BJJr0skdGVI0bXQsf2qAHLTEZxXfnfn6pjEB3j46Pehh1J6G1aNJepF6e84nncLw3ORW ZUgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=fuMxDUAbf43Y/mtoSLcRFxim2yHtuVzh11XrDpqVUIc=; b=o7id96/kKnDAjwjLNzNTex7jcluqmxQBNmTHCwpbGxOaATogH44UYa6QkNRREhz/h3 Ixhch53a0/E901ouiZCoc1UAONH/DaBieeJ5NJZx4CFBQ7xy/tkrHEgH2JzLkBDMZRs/ bte4Fr7RVKmF1tsz/k7Agr7IfNycLnwSN5NOqTUIFB9wptUEicgPp/FnRT6opOEyIUhw ASYBM9MuPzbYok6MeH2JeTW9PlWjMCBa8aTKMYmEMS6zRpxXJkcfA3ObD3OoOiVSBtSU 2h3cdPmVKcgr5FRbPm/Z9Yt815BGnBrCHuS/T49F10A/tkyKZ1a/dIVOrjKmAs+Z02Ol IPiw==
X-Gm-Message-State: AMCzsaWX7feqMG2ERcZ8EffogbKGkrbRfPqU/gZxBWmxRiMk/w1/+kXv lqDr1rdEGnY4zdyWRGKoARHzg6hUM8IoL439+xA=
X-Google-Smtp-Source: ABhQp+RKUrLR950nt92ijPwTBeoJxlS4ZHbiqRMxXHxvle63GViz+JXqdzlKh3SUfERjaaZ6+WPk78NVbBzuxOR7bbc=
X-Received: by 10.176.21.35 with SMTP id o32mr1670556uae.177.1508938123106; Wed, 25 Oct 2017 06:28:43 -0700 (PDT)
MIME-Version: 1.0
Sender: olga.kornievskaia@gmail.com
Received: by 10.103.59.202 with HTTP; Wed, 25 Oct 2017 06:28:42 -0700 (PDT)
In-Reply-To: <CADaq8jcASncJWSR23VWw_6REy89DUDdyAt=F0RiAD-XFjGc_tA@mail.gmail.com>
References: <CADaq8jc6vWdXonTs3795QWO8SWJTudo=x9=gR4uKN+tnfBk+dw@mail.gmail.com> <20170224222135.GJ26378@fieldses.org> <CAN-5tyHJb=ercWh_W2uzPfKR86j=dGWx=zYH1y+TjbNTzYh38A@mail.gmail.com> <20170228164420.GA28845@fieldses.org> <CADaq8jdivTUVNx2LXCiecAKY-nfoZP_XoAoNLwc3V1TUD6X8vg@mail.gmail.com> <CC84C4DB-F00F-45FC-8307-BDA5424DA480@netapp.com> <20170228173215.GA29700@fieldses.org> <CAN-5tyF8EZjYNX3cE43BPM9CbxVLygRdPuTJf_RgC7ntDCf9Kg@mail.gmail.com> <20171020193306.GF15211@fieldses.org> <CAN-5tyHaJeis=_f9h9u1St76Og3A_TtBUxZx_Z=ZouG7sa2=6w@mail.gmail.com> <20171024013646.GA22943@fieldses.org> <CADaq8jdWkTfQB-Y55ow1A23AGCVM12LtwjXYZ6E7zU7M=Aw89g@mail.gmail.com> <CAN-5tyHM5suS=iqP0XL3pD2i2YYtU2k1Wd1jnHb+FT52sXzsHw@mail.gmail.com> <CADaq8jcASncJWSR23VWw_6REy89DUDdyAt=F0RiAD-XFjGc_tA@mail.gmail.com>
From: Olga Kornievskaia <aglo@citi.umich.edu>
Date: Wed, 25 Oct 2017 09:28:42 -0400
X-Google-Sender-Auth: tfIMMLN-v5g_9v2BiId0jEB7dGQ
Message-ID: <CAN-5tyGrSgdg85d9Vsf+u3XDrr46coOGrzQAgrx_y9cPaRQ19Q@mail.gmail.com>
To: David Noveck <davenoveck@gmail.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/auZP-FZ9SvI8b1ctWtrPEE2ro14>
Subject: Re: [nfsv4] Server-side copy question
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.22
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, 25 Oct 2017 13:28:47 -0000
On Wed, Oct 25, 2017 at 6:30 AM, David Noveck <davenoveck@gmail.com> wrote: > >>I would like to understand the comment by Bruce and you about not >> knowing which bytes were copied. I don't understand why it would not >> be the bytes from the offset to offset+bytes_copied? And Dave, >> wouldn't the "rest of the bytes" be the request length - bytes_copied?s >> have been copied." > > It might be and it is resonable if it is but RFC7862, says, as Bruce noted, > "The coa_bytes_copied value indicates the number of bytes copied but > not which specific bytes.". I don't know wny it says that or how those > words came > to be in the spec. If the spec did not say that, it would reasonable to > assume that it > would be the bytes from the offset to offset+bytes_copied. But given > RFC7862, > as it is, I think clients cannot assume that. It may be that these words > are just > plaiin wrong, but assuming that is risky, and fixing the spec to remove them > is very > difficult, even if everyone were to agree that they shouldn't be there. Ah, got it. Thank you. > , > > On Tue, Oct 24, 2017 at 11:52 AM, Olga Kornievskaia <aglo@citi.umich.edu> > wrote: >> >> On Tue, Oct 24, 2017 at 7:43 AM, David Noveck <davenoveck@gmail.com> >> wrote: >> >> So in the short write case it sounds like it *is* the server's >> >> responsibility to commit. >> > >> > Perhaps it should be the server's responsibility, but it is not, >> > according to RFC7862 >> > >> >> That's weird, >> > >> > I agree that it is wierd. I feel it is well-intentioned but not viable >> > since >> > you are essentially creating your own protocol, if clients depend on >> > this behavior an there is no point in doing it, if clients do not. >> > >> >> but as long as the short write >> >> case is rare, maybe it's not a big deal? >> > >> > From a performance point of view, it is not a big deal. However it is >> > a big deal that the spec is broken. I hate when that happens :-( >> > >> >>Hm: "The coa_bytes_copied value indicates the number of bytes copied but >> >> not which specific bytes have been copied." That makes >> >> coa_bytes_copied >> >> pretty much worthless. >> > >> > Any non-zero value of coa_bytes_copied is worthless because the client >> > does >> > not know: >> > >> > Which particular bytes were copied >> > Whether those bytes were copied to the destination stably >> > How to commit any non-stably-written bytes. >> > >> >>I guess I'd be in favor of using the NFS_OK branch of CB_OFFLOAD >> >> whenever a nonzero number of bytes is copied. >> > >> > That's likely to create an interoperability problem, since there are >> > almost >> > certainly clients who assume that when there is no error, all requested >> > bytes >> > have been copied. >> >> I don't think it's true that clients would assume this. I think the >> client can only assume server copied as many bytes as it was specified >> in the CB_OFFLOAD bytes_copied regardless of how many bytes the client >> had asked for. At least that's how I read the spec. >> >> > Basically, the server is pretending there is no error and >> >> Yes, pretending that there was no error is the part I'm not totally >> comfortable with. And I agree with the comments that the client can >> try again to get the same error. >> >> > then >> > relying on the client to figure out that there was one, which could only >> > be >> > done if the >> > spec tells the clients about this. If RFC7862 doesn't do this, you wind >> > up >> > essentially creating a private protocol. >> > >> >> If less than the >> >> requested number of bytes were copied, the client can always find out >> >> the error (if any) by attempting to copy the rest. >> > >> > Unfortunately there is no way of determining which bytes were copied so >> > there >> > is no way of knowing "the rest", i.e. the bytes not copied >> >> I would like to understand the comment by Bruce and you about not >> knowing which bytes were copied. I don't understand why it would not >> be the bytes from the offset to offset+bytes_copied? And Dave, >> wouldn't the "rest of the bytes" be the request length - bytes_copied? >> What am I missing? >> >> If you are suggested that the server is allowed to copy a requested >> range in any order of smaller chunks then there is a problem with a >> non-error case because we don't returned in COPY/CB_OFFLOAD offset and >> bytes_copied (just bytes_copied). >> >> I think we know which bytes are copied we just don't know how they >> were copied: stable or not (if the server chooses to specify an error >> in CB_OFFLOAD). >> >> > On Mon, Oct 23, 2017 at 9:36 PM, J. Bruce Fields <bfields@fieldses.org> >> > wrote: >> >> >> >> On Mon, Oct 23, 2017 at 05:43:42PM -0400, Olga Kornievskaia wrote: >> >> > On Fri, Oct 20, 2017 at 3:33 PM, J. Bruce Fields >> >> > <bfields@fieldses.org> >> >> > wrote: >> >> > > On Wed, Oct 18, 2017 at 05:22:08PM -0400, Olga Kornievskaia wrote: >> >> > >> On Tue, Feb 28, 2017 at 12:32 PM, J. Bruce Fields >> >> > >> <bfields@fieldses.org> wrote: >> >> > >> > On Tue, Feb 28, 2017 at 05:04:27PM +0000, Adamson, Andy wrote: >> >> > >> >> I also thought that bytes copied is only included in the >> >> > >> >> success >> >> > >> >> case – but as Olga pointed out, not true. The coa_status of >> >> > >> >> NFS4_OK has the >> >> > >> >> coa_resok4->wr_count showing the bytes copied, and the default >> >> > >> >> (e.g. failure >> >> > >> >> cases) has the coa_bytes_copied. >> >> > >> >> >> >> > >> >> So the server can send a CB_OFFLOAD with an error (such as the >> >> > >> >> –EINVAL in the example) and send the bytes copied in >> >> > >> >> coa_bytes_copied. >> >> > >> >> >> >> > >> >> union offload_info4 switch (nfsstat4 coa_status) { >> >> > >> >> case NFS4_OK: >> >> > >> >> write_response4 coa_resok4; >> >> > >> >> default: >> >> > >> >> length4 coa_bytes_copied; >> >> > >> >> }; >> >> > >> > >> >> > >> > Gah, I'm sorry, Olga said CB_OFFLOAD but for some reason I was >> >> > >> > looking >> >> > >> > at COPY. >> >> > >> > >> >> > >> > I have no idea what to think of that. I don't see why it should >> >> > >> > be >> >> > >> > different from COPY. >> >> > >> >> >> > >> I'd like to resurrect this thread... >> >> > >> >> >> > >> This discussion was initiated to allow for the server to do a >> >> > >> partial >> >> > >> copy instead of failing the copy with EINVAL when copy is >> >> > >> requested >> >> > >> beyond the end of the file. >> >> > >> >> >> > >> However, the problem I'm running into is that because CB_OFFLOAD >> >> > >> only >> >> > >> returns "coa_bytes_copied" and does not include stable_how and >> >> > >> verifier. So even if client were to then send a COMMIT for the >> >> > >> bytes >> >> > >> that were copied, it has no verifier to match from the COMMIT to >> >> > >> anything. >> >> > >> >> >> > >> Should the client then ignore the lack of the matching verifier >> >> > >> and >> >> > >> just assume the data was committed for the partial bytes? >> >> > > >> >> > > Yes, sounds like in the asynchronous case the server has to wait >> >> > > for >> >> > > the >> >> > > writes to reach disk before calling CB_OFFLOAD. (Do we currently >> >> > > do >> >> > > that?). >> >> > >> >> > Why? No the spec does not require the server to do no such thing. The >> >> > server sends back in CB_OFFLOAD if the bytes were written as UNSTABLE >> >> > or FILE_SYNC. >> >> >> >> Look back at what you said before.... So the problem you were >> >> explaining (missing stable_how and verifier) was only for the short >> >> write case? >> >> Yes. >> >> >> So in the short write case it sounds like it *is* the server's >> >> responsibility to commit. >> >> I disagree. I don't see anywhere in the spec that requires the server >> to do that. >> >> >> That's weird, but as long as the short write >> >> case is rare, maybe it's not a big deal? >> >> >> >> Hm: "The coa_bytes_copied value indicates the number of bytes copied >> >> but >> >> not which specific bytes have been copied." That makes >> >> coa_bytes_copied >> >> pretty much worthless. >> >> Yep that's what I thought. >> >> >> I guess I'd be in favor of using the NFS_OK branch of CB_OFFLOAD >> >> whenever a nonzero number of bytes is copied. If less than the >> >> requested number of bytes were copied, the client can always find out >> >> the error (if any) by attempting to copy the rest. >> >> Ok >> >> >> >> >> --b. >> >> >> >> > >> >> > > In theory that shouldn't be too expensive because asynchronous COPY >> >> > > should normally be done with a very large range. >> >> > > >> >> > > (I wonder if the server should just do a synchronous copy if the >> >> > > copy >> >> > > would be less than a few megs?) >> >> > >> >> > Yes the server could determine to convert an asynchronous copy into a >> >> > synchronous one based on size. >> >> > >> >> > I guess I'm still confused how to handle the implementation so that >> >> > it >> >> > doesn't kill interoperability with other possible (future) >> >> > implementations... >> >> >> >> _______________________________________________ >> >> nfsv4 mailing list >> >> nfsv4@ietf.org >> >> https://www.ietf.org/mailman/listinfo/nfsv4 >> > >> > > >
- [nfsv4] Server-side copy question Mora, Jorge
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Thomas Haynes
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Trond Myklebust
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Trond Myklebust
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Adamson, Andy
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Olga Kornievskaia