Subject: [nfsv4] LAYOUTGET missing layout segments

From: Karen Rochford <[email-masked]>
Date: Mon, 17 Nov 2008 09:14:24 -0700

I have a question about how to interpret missing layout segments from a 
LAYOUTGET.    Lets say a client isses a LAYOUTGET for a byte range of a 
file.  The metadata server returns multiple layouts which map some of 
the bytes requested by the client, but not all.  That is, the response 
will have multiple layout4 structures, but the byte range mapped by 
these layout4 structures does not cover the entire byte range requested 
from the client.  The status to this LAYOUTGET will be success, since it 
is returning some layouts. 

My question is, how do I interpret the status of the missing piece?  
NFS4ERR_LAYOUTTRYLATER?   NFS4ERR_LAYOUTUNAVAILABLE? 

Thanks,

Karen

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

---

From: "Halevy, Benny" <[email-masked]>
Date: Mon, 17 Nov 2008 12:55:55 -0500

Karen,
 
The status of the missing range is undetermined.
The client may ask for it again right away or do some work
using the layout it did get and then ask again for the rest.
 
If this is how you handle NFS4ERR_LAYOUTTRYLATER then
from the implementation point of view it might make sense to
treat these two cases similarly.
 
Note that the cases defer with regards to signal_layout_avail
since to pass logr_will_signal_layout_avail back to the client
the sever must return NFS4ERR_LAYOUTTRYLATER for the
whole range.
 
Benny

________________________________

From: [email-masked] on behalf of Karen Rochford
Sent: Mon 2008-11-17 11:14
To: [email-masked]
Subject: [nfsv4] LAYOUTGET missing layout segments

Thanks,

Karen

---

From: "Mike Eisler" <[email-masked]>
Date: Mon, 17 Nov 2008 10:00:33 -0800 (PST)

> NFS4ERR_LAYOUTTRYLATER?   NFS4ERR_LAYOUTUNAVAILABLE?

The NFSv4.1 spec says:

".  There MUST be no gaps or overlaps
   in the range between two successive elements of logr_layout."

So on the surface, the only place where something could be
missing is at the start or at the end. But the rules of table
12 in the NFSv4.1 spec severely limit whether something be missing
at the start or end. In fact, nothing can ever be missing from
the start.

In general, the offset of the first layout segment in logr_layout
MUST be <= the loga_offset argument to LAYOUTGET. The total length
of segments MUST be <= loga_offset - logr_layout[0].lo_offset
+ loga_minlength. This IS a generalization; Table 12 has the
full set of mandates.

If a server fails to conform to the mandate, then the client should
conclude the server does not support pNFS.

With respect to loga_length, a gap at the end is allowed, whenever
loga_length >= loga_minlength, but again, only with respect to
loga_length. Table 13 governs what the server MUST/SHOULD return.
If the server returns a total length that is < loga_offset -
logr_layout[0].lo_offset + loga_length, then the client should attempt
a LAYOUTGET for the gap between loga_length and loga_minlength when it
needs such a layout.

-- 
Mike Eisler, Senior Technical Director, NetApp, 719 599 9026,
http://blogs.netapp.com/eislers_nfs_blog/