Subject: [nfsv4] LAYOUTCOMMTI clarifications (was Notes from Bakeathon (re-sending))

From: Spencer Shepler <[email-masked]>
Date: Thu, 21 Oct 2010 16:40:41 +0000

For the LAYOUTCOMMIT issues, at this point it seems some text
is needed to further discussion towards closure.  This doesn't 
need to be in the form of an I-D at this point given that,
as Dave points out, may be an errata for the RFCs.

Spencer

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> sfaibish
> Sent: Thursday, October 21, 2010 8:56 AM
> To: nfsv4 list
> Subject: [nfsv4] Fwd: Notes from Bakeathon (re-sending)
> 
> 
> 
> ------- Forwarded message -------
> From: sfaibish <[email-masked]>
> To: "nfsv4 list" <[email-masked]>
> Cc:
> Subject: Notes from Bakeathon (re-sending)
> Date: Thu, 21 Oct 2010 11:46:17 -0400
> 
> 
> 
> ------- Forwarded message -------
> From: sfaibish <[email-masked]>
> To: "nfsv4 list" <[email-masked]>
> Cc:
> Subject: Notes from Bakeathon
> Date: Thu, 21 Oct 2010 10:11:13 -0400
> 
> As I promissed I worked on the notes from the discussions at BAT.
> Attached please find some notes and presentations I want to post on the
> BAT web site. Please take a look and see if they are appropriate for
> posting. Also feel free to comment discuss in the list the notes and the
> discussions. Thank you all
> 
> /Sorin
> 
> 
> 
> --
> Best Regards
> 
> Sorin Faibish
> Corporate Distinguished Engineer
> Unified Storage Division
>          EMC²
> where information lives
> 
> Phone: 508-249-5745
> Cellphone: 617-510-0422
> Email : [email-masked]

---

From: Trond Myklebust <[email-masked]>
Date: Thu, 21 Oct 2010 12:54:01 -0400

> as Dave points out, may be an errata for the RFCs.

I am planning to contribute some errata text for this. I'll notify the
list as soon as I have a more or less final draft (hopefully in the next
few days).

Cheers
  Trond

> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/nfsv4

---

From: Benny Halevy <[email-masked]>
Date: Thu, 21 Oct 2010 20:07:01 +0200

> list as soon as I have a more or less final draft (hopefully in the next

I agree that the existing text needs to be clarified, given
the level of discussions we had about it. Thanks!

Though, to me it was pretty clear that we roughly reached consensus (lower
case, not ietf ROUGH CONSENSUS ;-) that LAYOUTCOMMIT is always required for
maintaining stable storage semantics. So, for example the client should not
drop dirty data out of its cached until that data is stable at the DS
and a respective LAYOUTCOMMIT was successfully processed by the server.

It is true that for some server implementations of the files layout,
LAYOUTCOMMIT might be superfluous as they have a state coherent back-end
protocol allowing the MDS and DS to implicitly keep files' metadata in sync
but there could be files-based servers implementing loosely coupled DSs
that will still require LAYOUTCOMMIT from the client for efficient
operation.

I also mentioned Dave Noveck's unofficial proposal from long ago to
extend the WRITE operation response stable_how4 with a LAYOUT_SYNC4 value:

   enum stable_how4 {
           UNSTABLE4       = 0,
           DATA_SYNC4      = 1,
           FILE_SYNC4      = 2
+          LAYOUT_SYNC4    = 3
   };

LAYOUT_SYNC4 on the DS means that the DS data, local metadata, and layout
are on stable storage and so the client does not need to send COMMIT to the DS
nor LAYOUTCOMMIT to the MDS.

Benny

---

From: <[email-masked]>
Date: Thu, 21 Oct 2010 22:26:56 -0400

> Though, to me it was pretty clear that we roughly reached 
> consensus (lower case, not ietf ROUGH CONSENSUS ;-) that 
> LAYOUTCOMMIT is always required for maintaining stable 
> storage semantics.

Having case be a discriminator of otherwise synonymous words seems like a loser.

Which of the 16,384 possible variants (14 letters) would belong to Spencer and Beepy and which to the hoi polloi?  The mind reels.

I'm not going to try to characterize opinion at the bakeathon.

I just would like to ask a question.

  1) Suppose I do either a synchronous write or I send an
  asynchronous write and get back an indication that it
  was done synchronously.

  2) I will note that the aforementioned operation is semantically 
  identical to doing an asynchronous write followed by COMMIT.

  3) So let us suppose that by doing 1), I have incurred the
  obligation to do a LAYOUTCOMMIT.  So what is the deadline
  on completing this obligation.  It doesn't seems sensible 
  that it turn on when the block leaves my cache.  The fact that
  it was written synchronously, means that it will never be 
  resent, so that doesn't seem to be valid as a condition.

  4) Given that, it is hard to find any deadline for my
  LAYOUTCOMMIT other CLOSE (or maybe some long time if the
  CLOSE is delayed indefinitely).

  5) But know note that in the case of 2), we have a similar
  situation.  Once the COMMIT returns, it doesn't matter when
  the block gets flushed from my cache.  So if do the COMMIT
  incurs an obligation to do a LAYOUTCOMMIT, the deadline for
  completion of this is the CLOSE.

  6) But if that is the case, why not have the WRITE, rather
  than the COMMIT incur the obligation.

  So I just don't see the COMMIT/LAYOUTCOMMIT connection.  Can
  someone explain to me what I'm missing?  I've hear lots of
  assertion, but I still haven't heard an explanation.

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Benny Halevy
Sent: Thursday, October 21, 2010 2:07 PM
To: Trond Myklebust
Cc: nfsv4 list
Subject: Re: [nfsv4] LAYOUTCOMMTI clarifications (was Notes from Bakeathon (re-sending))

   enum stable_how4 {
           UNSTABLE4       = 0,
           DATA_SYNC4      = 1,
           FILE_SYNC4      = 2
+          LAYOUT_SYNC4    = 3
   };

Benny

---

From: Benny Halevy <[email-masked]>
Date: Thu, 28 Oct 2010 00:02:11 +0200

>   resent, so that doesn't seem to be valid as a condition.

That's true when writing to the MDS.  It makes sense when
writing to the DS, when you take loosely coupled data servers
into consideration.

In particular, in the block layout type, the client may be writing
into provisionally allocated blocks on storage.  Although the
writes are synchronous in nature, further failure to commit
the layout to the MDS may require the client to get a new layout,
re-write the data onto newly allocated blocks and attempt
layoutcommit again.

Benny

---

From: <[email-masked]>
Date: Thu, 28 Oct 2010 09:46:43 -0400

OK, but if we are in the block mapping type we are not doing any COMMITs to the DS, which is where this started.  My head hurts.

The first step to effective pain relief in this area is to divide up the question into what are the requirements on LAYOUTCOMMIT for the protocol as a whole (i.e. would apply to all mapping types existing and yet-to-be invented) and what other per-mapping-type requirements are there, for those mapping types.  I think dividing things up this way will help us reduce mutual incomprehension as one person talks about the way the world is (his mapping type) and it doesn't make sense to the other guy who lives in a different mapping-type world.

-----Original Message-----
From: Benny Halevy [mailto:[email-masked]] 
Sent: Wednesday, October 27, 2010 6:02 PM
To: Noveck, David
Cc: [email-masked]; [email-masked]
Subject: Re: [nfsv4] LAYOUTCOMMTI clarifications (was Notes from Bakeathon (re-sending))

Benny

---

From: Benny Halevy <[email-masked]>
Date: Thu, 28 Oct 2010 16:29:19 +0200

> OK, but if we are in the block mapping type we are not doing any COMMITs to the DS, which is where this started.  My head hurts.

True, SCSI writes can be considered in this model similar to NFS WRITEs with committed == FILE_SYNC4
or to NFS WRITEs with committed != FILE_SYNC4 followed by a successful COMMIT to the DS.

> 
> The first step to effective pain relief in this area is to divide up the question into
> what are the requirements on LAYOUTCOMMIT for the protocol as a whole
> (i.e. would apply to all mapping types existing and yet-to-be invented)
> and what other per-mapping-type requirements are there, for those mapping types.
>  I think dividing things up this way will help us reduce mutual incomprehension as one person
> talks about the way the world is (his mapping type) and it doesn't make sense to the other guy
> who lives in a different mapping-type world.

Agreed.

Benny