Re: [nfsv4] More layout stuff: layout return on close
<david.noveck@emc.com> Mon, 29 November 2010 18:27 UTC
Return-Path: <david.noveck@emc.com>
X-Original-To: nfsv4@core3.amsl.com
Delivered-To: nfsv4@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D52683A6C24 for <nfsv4@core3.amsl.com>; Mon, 29 Nov 2010 10:27:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level:
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n0k0hoVMvFBf for <nfsv4@core3.amsl.com>; Mon, 29 Nov 2010 10:27:54 -0800 (PST)
Received: from mexforward.lss.emc.com (mexforward.lss.emc.com [128.222.32.20]) by core3.amsl.com (Postfix) with ESMTP id CBC443A6B42 for <nfsv4@ietf.org>; Mon, 29 Nov 2010 10:27:53 -0800 (PST)
Received: from hop04-l1d11-si04.isus.emc.com (HOP04-L1D11-SI04.isus.emc.com [10.254.111.24]) by mexforward.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id oATIT0Gl013655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Nov 2010 13:29:01 -0500
Received: from mailhub.lss.emc.com (mailhub.lss.emc.com [10.254.222.226]) by hop04-l1d11-si04.isus.emc.com (RSA Interceptor); Mon, 29 Nov 2010 13:28:50 -0500
Received: from corpussmtp3.corp.emc.com (corpussmtp3.corp.emc.com [10.254.169.196]) by mailhub.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id oATIRu8p016767; Mon, 29 Nov 2010 13:27:56 -0500
Received: from CORPUSMX50A.corp.emc.com ([128.221.62.43]) by corpussmtp3.corp.emc.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 29 Nov 2010 13:27:56 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Mon, 29 Nov 2010 13:27:55 -0500
Message-ID: <BF3BB6D12298F54B89C8DCC1E4073D8002A5F455@CORPUSMX50A.corp.emc.com>
In-Reply-To: <1291053460.12784.14.camel@heimdal.trondhjem.org>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [nfsv4] More layout stuff: layout return on close
Thread-Index: AcuP7wlgrb/0haZ+Slyz2V7xv9ecwQAAEVCg
References: <1290552459.30508.4.camel@heimdal.trondhjem.org> <4CECC382.5020207@panasas.com> <4CECE104.5080009@desy.de> <1290610592.3234.20.camel@heimdal.trondhjem.org><4CEE283D.5040903@desy.de> <1290692948.2911.7.camel@heimdal.trondhjem.org> <4CEE8AA9.1030109@desy.de> <BF3BB6D12298F54B89C8DCC1E4073D8002A5F2B6@CORPUSMX50A.corp.emc.com> <4CF25270.5050609@panasas.com> <1290968847.12027.6.camel@heimdal.trondhjem.org> <BF3BB6D12298F54B89C8DCC1E4073D8002A5F323@CORPUSMX50A.corp.emc.com> <1291045387.12784.7.camel@heimdal.trondhjem.org> <BF3BB6D12298F54B89C8DCC1E4073D8002A5F42F@CORPUSMX50A.corp.emc.com> <1291053460.12784.14.camel@heimdal.trondhjem.org>
From: david.noveck@emc.com
To: Trond.Myklebust@netapp.com
X-OriginalArrivalTime: 29 Nov 2010 18:27:56.0756 (UTC) FILETIME=[24CEF940:01CB8FF3]
X-EMM-MHVC: 1
X-EMM-MFVC: 1
Cc: bhalevy@panasas.com, nfsv4@ietf.org
Subject: Re: [nfsv4] More layout stuff: layout return on close
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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: Mon, 29 Nov 2010 18:27:58 -0000
There are three possibilities that occur to me. If there are more, I'd prefer not to know :-) Stateid-that-created the layout: I take your point about usefulness, and the text doesn't say anything specifically that says this is right. On the other hand, if it is not used for this (determining when to return return-on-close segments), what is it used for? It seems like it should be used for something, if it there. Any-close: Not sure this is very useful, but if you were just trying to read what the spec says, it seems like that is what the spec says. There are lots of places where you would expect it to say "last close" if that was what was meant, but I don't see them. Does it say this anywhere? Last-close: This seems the most useful choice but it isn't what the spec says, so if we can all agree that this is what it should say, maybe the errata mechanism would be used to fix this as well. Also, it occurs to me that delegation adds another level complexity/nightmare and a delegation stateid can be passed just as a open or lock stateid can. One purpose of the delegation is that opens/closes on the client, as long as there is a delegation can be hidden from the server, so I guess this means that the responsibility for effecting a last-close return, when a delegation is present is for the client to do by means of LAYOUTRETURN to the server. Given that the client is in control, he knows the ordering and doesn't have to be conservative on open/close ordering. Finally, let me ask this question. You pass a stateid, which if it is not layout stateid, is either a lock stateid, and open stateid, or a delegation stateid. What I seem to be hearing (and correct me if I'm wrong), is that the only information conveyed by any of these three to the server is the fh of the file. That is any lock stateid is equivalent to the associated open stated; any open stateid is equivalent to any other open-stateid (given the last-close interpretation, anyway), and that is equivalent of any delegation stateid for that same file. If not, what are the semantic differences among these three? -----Original Message----- From: Trond Myklebust [mailto:Trond.Myklebust@netapp.com] Sent: Monday, November 29, 2010 12:58 PM To: Noveck, David Cc: bhalevy@panasas.com; nfsv4@ietf.org Subject: RE: [nfsv4] More layout stuff: layout return on close On Mon, 2010-11-29 at 12:43 -0500, david.noveck@emc.com wrote: > So I think we have held different positions (I held many different > positions in the last five minutes) about what close(s) return-on-close > is referring to. When I wrote my last post I was assuming that it > referred to only the open associated with the stateid from which the > layout stateid was derived. > > I can see that I was jumping to a conclusion, but the alternatives that > allow the close and thus the open to which return-on-close refers to be > uncertain. I'm not clear how this can work in the general case. > > So you are referring to the "last close" and I assume that that means > you think that only "last close" (last close among all open of the fh > for the same client, for the same openowner?). Is that said somewhere > in the spec? Am I missing some explanation of this in the spec? > > I take your general point that the conservative approach on the client > can resolve the synchronization issues, at least without layout value > conflict, but what I'm having trouble with is understanding how this > feature might be useful to the server. That is a layout segment, that > is associated with (some set of) open(s), and will go away under some > set of closes, with it going away even more frequently on the client due > to client conservatism. Is this really useful, when all the complexity > associated with it, is fully recognized? (Nor a rhetorical question). I've always understood from the spec that layouts are supposed to be independent of the OPEN stateid/delegation stateid that was used to obtain them. That is why I have interpreted return-on-close to mean return before last close. If you go away from this interpretation, and say that the return-on-close is tied to the particular stateid that was used in the original LAYOUTGET, then the client is going to need a way to obtain per-stateid layouts in order to be able to handle multiple processes reading and writing to the same file using different file descriptors. Cheers Trond > -----Original Message----- > From: Trond Myklebust [mailto:Trond.Myklebust@netapp.com] > Sent: Monday, November 29, 2010 10:43 AM > To: Noveck, David > Cc: bhalevy@panasas.com; nfsv4@ietf.org > Subject: RE: [nfsv4] More layout stuff: layout return on close > > On Sun, 2010-11-28 at 18:23 -0500, david.noveck@emc.com wrote: > > I think these two case are different. > > > > I think the CB_LAYOUTRECALL case does have sequencing issues but they > > are dealt with, at least in the case of LAYOUTRECALL4_FILE, by the > fact > > that that the seqid in lor_stateid tells the client what revision of > > layout state is being referred to, and thus implicitly tells the > server > > what layout changes in flight are or are not covered by the > > NFS4ERR_NOMATCHING_LAYOUT. > > > > As Benny points out, the CLOSE doesn't have that, but I don't see an > > ordering problem. The seqid ordering mechanism is to make sure that > the > > client and the server agree on the corpus of layout-segments with > > return-on-close best thought of as attribute for each segment part of > > that layout segment corpus. The close doesn't change that corpus in a > > way that interferes with ongoing LAYOUT operations. It merely > > eliminates from active use those bearing the return-on-close attribute > > and that shift can be done independently on the client and the server. > > > > Let's get more concrete here. I don't see how there should be > ordering > > issues between close and LAYOUTRETURNs. If the segment is returned > > before the close or after the close, it is still gone. I don't see > any > > perceivable difference. Now let's take the case of LAYOUTGET and > close. > > Suppose you get a LAYOUTGET response, and it overlaps (for simplicity > > let use say it is identical but I don't think the overlap case is > really > > any different). What determines whether the client should treat this > as > > a segment he still has (post-close), is whether it has the > > return-on-close flag set. If it does, he should assume it is gone > (and > > it must have been sent before the close was processed). If it doesn't > > have that set he should assume it still exists, apart from ordering. > If > > it was sent before the close, then the layout segment was upgraded to > > non-open-specific, so it doesn't go away at close. OTOH, if it was > sent > > after the close, then the segment went away at the close and was added > > afterwards. However, in either case, he (the client) should assume he > > has still has it and the that server matches in that regard. > > The client knows if this is the last close, and so even if it sends out > a parallel OPEN + LAYOUTGET, then it knows that the server may have > received the close before the parallel LAYOUTGET. As long as the client > is conservative, and forgets about the segments that may have been > invalidated by the close, then the forgetful model works fine. > > Note that you cannot use the OPEN stateid to figure out the ordering > here, since the close and OPEN may have different associated open owners > (and/or the close may really have been a DELEGRETURN), so you really do > have to rely on the client being conservative. > > > -----Original Message----- > > From: nfsv4-bounces@ietf.org [mailto:nfsv4-bounces@ietf.org] On Behalf > > Of Trond Myklebust > > Sent: Sunday, November 28, 2010 1:27 PM > > To: Benny Halevy > > Cc: nfsv4@ietf.org > > Subject: Re: [nfsv4] More layout stuff: layout return on close > > > > On Sun, 2010-11-28 at 15:00 +0200, Benny Halevy wrote: > > > Re-thinking the resolution of this implicit return of the layout > > > and its interaction with other layout state-changing operations; > > > since CLOSE does not return a layout stateid, like LAYOUTRETURN, > > > it would be useful only to return the whole file layout, and not > just > > > the segments marked with return_on_close. Otherwise, what would be > > > the layout stateid post CLOSE, and how will the client order this > > > state change with other in-flight LAYOUTGETs and/or LAYOUTRETURNs. > > > > Err.... In what way does this differ from the client returning > > NFS4ERR_NOMATCHING_LAYOUT to CB_LAYOUTRECALL? The spec allows the > client > > to do so in the case where it holds no layout segments that overlap > with > > the layout recall argument. In that case the server just updates its > > idea of what the layout looks like without changing the stateid. > > > > > So I suggest we make the implicit layout return an equivalent of: > > > > > > lora_reclaim == false (let's say that during the grace period the > > > client must used LAYOUTRETURN with lora_reclaim == true) > > > lora_layout_type == good question. I'm inclined towards defining it > > > as a wildcard, i.e. all layout_types from which the client got a > > layout > > > for this file. > > > lora_iomode == LAYOUTIOMODE4_ANY > > > lr_returntype == LAYOUTRETURN4_FILE > > > lrf_offset == 0 > > > lrf_length == NFS4_MAXFILELEN > > > lrf_stateid == the most recent layout stateid provided by the server > > > empty lrf_body > > > > > > The implicit successful result is equivalent to > > > lrs_present == false > > > and any outstanding LAYOUTGETs and LAYOUTRETURNs, sent before CLOSE > > > MUST be drained and ignored by the client. > > > Any new layout operation MUST be issued after re-opening the file > > > and obtaining a new open, lock, or delegation stateid. > > > > > > In addition, the following error codes that are currently applicable > > > for LAYOUTRETURN and not for CLOSE need to be added to CLOSE: > > > NFS4ERR_DELEG_REVOKED > > > NFS4ERR_GRACE > > > > That seems unnecessary. > > > > If your client cares about updating the stateid (why would it?) then > > send the LAYOUTRETURN before the CLOSE, if not, dont, and just forget > > the segments that were marked as return-on-close. > > > > Trond > > > -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@netapp.com www.netapp.com
- [nfsv4] More layout stuff: layout return on close Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Tigran Mkrtchyan
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Tigran Mkrtchyan
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Tigran Mkrtchyan
- Re: [nfsv4] More layout stuff: layout return on c… david.noveck
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Sorin Faibish
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Sorin Faibish
- Re: [nfsv4] More layout stuff: layout return on c… david.noveck
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… david.noveck
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… david.noveck
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… david.noveck
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… david.noveck
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Fred Isaman
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… david.noveck
- Re: [nfsv4] More layout stuff: layout return on c… Spencer Shepler
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust
- Re: [nfsv4] More layout stuff: layout return on c… Benny Halevy
- Re: [nfsv4] More layout stuff: layout return on c… Trond Myklebust