Re: [nfsv4] More layout stuff: layout return on close
Trond Myklebust <trond.myklebust@fys.uio.no> Tue, 30 November 2010 18:16 UTC
Return-Path: <trond.myklebust@fys.uio.no>
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 16F4D3A6C25 for <nfsv4@core3.amsl.com>; Tue, 30 Nov 2010 10:16:39 -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=[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 EKTT2KMdZy3i for <nfsv4@core3.amsl.com>; Tue, 30 Nov 2010 10:16:38 -0800 (PST)
Received: from mail-out2.uio.no (mail-out2.uio.no [129.240.10.58]) by core3.amsl.com (Postfix) with ESMTP id B16DF3A6C20 for <nfsv4@ietf.org>; Tue, 30 Nov 2010 10:16:37 -0800 (PST)
Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out2.uio.no with esmtp (Exim 4.69) (envelope-from <trond.myklebust@fys.uio.no>) id 1PNUlw-0007HG-MI; Tue, 30 Nov 2010 19:17:48 +0100
Received: from c-98-250-51-247.hsd1.mi.comcast.net ([98.250.51.247] helo=[192.168.1.129]) by mail-mx2.uio.no with esmtpsa (SSLv3:CAMELLIA256-SHA:256) user trondmy (Exim 4.69) (envelope-from <trond.myklebust@fys.uio.no>) id 1PNUlv-0002xu-JF; Tue, 30 Nov 2010 19:17:48 +0100
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Benny Halevy <bhalevy@panasas.com>
In-Reply-To: <4CF51EB1.1030302@panasas.com>
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> <4CF514BA.50901@panasas.com> <1291130418.5123.8.camel@heimdal.trondhjem.org> <1291130781.5123.11.camel@heimdal.trondhjem.org> <4CF51EB1.1030302@panasas.com>
Content-Type: text/plain; charset="UTF-8"
Date: Tue, 30 Nov 2010 13:17:41 -0500
Message-ID: <1291141061.2889.10.camel@heimdal.trondhjem.org>
Mime-Version: 1.0
X-Mailer: Evolution 2.32.1 (2.32.1-1.fc14)
Content-Transfer-Encoding: 7bit
X-UiO-Ratelimit-Test: rcpts/h 2 msgs/h 1 sum rcpts/h 3 sum msgs/h 1 total rcpts 1222 max rcpts/h 20 ratelimit 0
X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO)
X-UiO-Scanned: 6349BAECF2756A30C4E5EFC1362E59970178438F
X-UiO-SPAM-Test: remote_host: 98.250.51.247 spam_score: -49 maxlevel 80 minaction 2 bait 0 blacklist 0 greylist 0 ratelimit 0
Cc: 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: Tue, 30 Nov 2010 18:16:39 -0000
On Tue, 2010-11-30 at 17:56 +0200, Benny Halevy wrote: > On 2010-11-30 17:26, Trond Myklebust wrote: > > On Tue, 2010-11-30 at 10:20 -0500, Trond Myklebust wrote: > >> On Tue, 2010-11-30 at 17:14 +0200, Benny Halevy wrote: > >>> On 2010-11-29 01:23, 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. > >>> > >>> How about the resulting layout stateid? > >>> What should the client use on the next layout operation? > >> > >> The same layout stateid he would have used if the server had recalled > >> that particular layout segment and he'd replied NOMATCHING_LAYOUT. > >> > > I think that gets ugly with parallel LAYOUTGETs that has return_on_close > set, since the client does not know if the server processed them > before the CLOSE or after it. Even if they are ignored the layout stateid > can get out of sync. That depends entirely on how we clarify the meaning of return-on-close, and is one of several reasons why I'm pushing for return-on-close == return-on-last-close (i.e. when the client holds no more open state on the file). Please see the other discussion. > I'm very nervous about the forgetful model's fuzziness. > We need a detailed algorithm and a simulator that verifies it to make > sure the client and server so not go out of sync and in no case > the client ends up holding a layout the server is not aware of. The spec says that we support it, and that's the model I want to see implemented in Linux. If there is remaining fuzziness, then please point out where. > >> IOW: the most recent stateid returned by LAYOUTGET, unless the client > >> has forgotten all layout segments for that file (i.e. the whole layout), > >> in which case it needs to use the open stateid. > > > > So, the thing to remember here is that the layout stateid is only useful > > for ordering LAYOUTGET w.r.t. LAYOUTRETURN. It has no other purpose. > > Wrong. It's also critical to handling of CB_LAYOUTRECALL and in particular > draining outstanding LAYOUTGETs and LAYOUTRETURNs if the stateid presented by > CB_LAYOUTRECALL is greater than the one the client holds plus one. > If you want this semantic for CLOSE then the safe thing to do is to serialize > the last CLOSE with LAYOUTGET and LAYOUTRETURN and then the stateid will be either > the current layout stateid plus one if there are other layout segments w/o > return_on_close, or reset to the non-layout stateid in case the client never > got such segments or it _explicitly_ returned them with LAYOUTRETURN or CB_LAYOUTRECALL+ > NFS4ERR_NOMATCHINGLAYOUT. No LAYOUTRETURN is required by the protocol if you are forgetful, and I refuse to add a load more serialisation primitives just in order to support the crazy serialisation crap that LAYOUTGET/LAYOUTRECALL/LAYOUTRETURN requires. The above paragraph is exactly the reason why I hate the non-forgetful model. > If the client just forgot them, it can't just reset the stateid on its own. Sure it can. If the client doesn't know the current value of the stateid (because it has forgotten it), then it signals that by using the open stateid. How else can the model work? > > If the client is using the forgetful model, then there is no > > LAYOUTRETURN, and so there is no ordering problem. Instead, the client > > uses the principle that it must be conservative w.r.t. ordering > > assumptions if it launches an OPEN+LAYOUTGET in parallel with a last > > close... > > Also outstanding LAYOUTGETs sent before the open that has return_on_close set. > This is why the safe thing is to implement a barrier and drain them before CLOSEing. Why would you have outstanding LAYOUTGETs if you are CLOSEing the file? Either there is more to read and write, and you may have outstanding LAYOUTGETs, or there is nothing more to read/write and so you can close the file. Trond
- [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