Subject: [nfsv4] IO_ADVISE and pNFS

From: Thomas Haynes <[email-masked]>
Date: Tue, 29 Apr 2014 20:44:44 -0700

When we had the discussion last week about the allowed set of operations
which could go to a DS, we forgot IO_ADVISE. I've added that to Section 3.3.1.

Another issue is Sections 3.2 and 15.6.6:

3.2.  Sharing of stateids with NFSv4.1

   A NFSv4.2 metadata server can hand out a layout to a NFSv4.1 storage
   device.  Section 13.9.1 of [RFC5661] discusses how the client gets a
   stateid from the metadata server to present to a storage device.

and

15.6.6.  pNFS File Layout Data Type Considerations

   The IO_ADVISE considerations for pNFS are very similar to the COMMIT
   considerations for pNFS.  That is, as with COMMIT, some NFS server
   implementations prefer IO_ADVISE be done on the DS, and some prefer
   it be done on the MDS.

   So for the file's layout type, it is proposed that NFSv4.2 include an
   additional hint NFL42_CARE_IO_ADVISE_THRU_MDS which is valid only on
   NFSv4.2 or higher.  Any file's layout obtained with NFSv4.1 MUST NOT
   have NFL42_UFLG_IO_ADVISE_THRU_MDS set.  Any file's layout obtained
   with NFSv4.2 MAY have NFL42_UFLG_IO_ADVISE_THRU_MDS set.  If the
   client does not implement IO_ADVISE, then it MUST ignore
   NFL42_UFLG_IO_ADVISE_THRU_MDS.

While it may be pretty clear, we might want to clarify 15.6.6 to say:

...
   For the file's layout type, it is proposed that NFSv4.2 include an
   additional hint NFL42_CARE_IO_ADVISE_THRU_MDS which is valid only on
   metadata servers running NFSv4.2 or higher.  Any file's layout obtained from
   a NFSv4.1 metadata server MUST NOT have
   NFL42_UFLG_IO_ADVISE_THRU_MDS set.  Any file's layout obtained
   with a NFSv4.2 metadata server MAY have NFL42_UFLG_IO_ADVISE_THRU_MDS
   set. However, if the layout utilizes NFSv4.1 storage devices, the IO_ADVISE
   operation cannot be sent to them.  
...

---

From: Christoph Hellwig <[email-masked]>
Date: Wed, 30 Apr 2014 12:14:02 +0200

> which could go to a DS, we forgot IO_ADVISE. I've added that to Section 3.3.1.

I don't think the text you added is entirely correct, as IO_ADVISE
behaves like LAYOUTCOMMIT, which is not listed in the list of commands
sent to the data server, but explained specificly because of the nature
that it might be sent to either the MDS or DS.

Somewhat related: NFL42_UFLG_IO_ADVISE_THRU_MDS is only mentioned in
15.6.6., but not listend in the middle section where other new
data types and values are introduced, maybe it should be mentioned a
little bit more prominently?

>    operation cannot be sent to them.  

That part looks fine to me.