Subject: [nfsv4] LAYOUTGET in draft-16 spec.

From: [email-masked]
Date: Wed, 14 Nov 2007 14:07:54 -0500

Spencer,

The changes in draft-16 for GETDEVICEINFO and GETDEVICELIST look great.
My fault for not noticing earlier, but a similar treatment applies to
LAYOUTGET in section 18.41.3.  If it is not too late,

union LAYOUTGET4res switch (nfsstat4 logr_status) {	
case NFS4_OK:	
	LAYOUTGET4resok logr_resok4;
case NFS4ERR_LAYOUTTRYLATER:
	bool logr_will_signal_layout_avail;
default:		default:	
	void;		void;	
};

should be

union LAYOUTGET4res switch (nfsstat4 logr_status) {	
case NFS4_OK:	
	LAYOUTGET4resok logr_resok4;
case NFS4ERR_LAYOUTTRYLATER:
	bool logr_will_signal_layout_avail;
case NFS4ERR_TOOSMALL:
	count4 logr_mincount;
default:		default:	
	void;		void;	
};

"	The loga_maxcount field specifies the maximum layout size (in
bytes)
	that the client can handle. If the size of the layout structure	
	exceeds the size specified by maxcount, the metadata server will

	return the NFS4ERR_TOOSMALL error."

should be

" The client provides loga_maxcount to limit the number of bytes for the
  result.  This maximum size represents all of the data being returned
  within the LAYOUTGETresok structure and includes the XDR
  overhead.  The server may return less data.  If the server is unable
  to return the data within the loga_maxcount 
  limit, the error NFS4ERR_TOOSMALL will be returned."

And a new paragraph should be added,

	"If NFS4ERR_TOOSMALL is returned, the results also contain	
	logr_mincount. The value of logr_mincount represents the minimum

	size necessary to obtain the layout."

-Jason

-----Original Message-----
From: Spencer Shepler [mailto:[email-masked]] 
Sent: Tuesday, November 06, 2007 12:54 AM
To: NFSv4
Subject: Re: [nfsv4] GETDEVICEINFO and GETDEVICELIST in the draft-15
spec

On Nov 1, 2007, at 2:09 PM, [email-masked] wrote:

> I have two minor issues with the draft-15 spec related to  
> GETDEVICEINFO and GETDEVICELIST.  The spec does not adequately  
> specify the meaning of gdia_maxcount.  The sentence describing its  
> usage states:
>
>
>
> "The client provides gdia_maxcount to limit the amount of device  
> address information to be returned for the mapping. If the mapping  
> can not be returned within the maximum specified, NFS4ERR_TOOSMALL  
> is returned."
>
>
>
> This sentence does not make clear if gdia_maxount limits the number  
> of bytes in the GETDEVICEINFO4res data structure, within the  
> "device_addr4" structure, or within the protocol specific opaque  
> data "da_addr_body".  I propose that the wording be changed to  
> clarify that this refers to the number of bytes in the  
> "device_addr4" portion of the response.

I agree that the use of gdia_maxcount is underspecified.

However, I would prefer the the "maxcount" be interpreted
as it is for the READDIR operation.

Quoting from that operation description:
   "The maxcount value of the argument is the maximum number of bytes  
for
    the result.  This maximum size represents all of the data being
    returned within the READDIR4resok structure and includes the XDR
    overhead.  The server may return less data.  If the server is unable
    to return a single directory entry within the maxcount limit, the
    error NFS4ERR_TOOSMALL will be returned to the client."

Therefore, I would suggest the text for GETDEVICEINFO be:

"The client provides gdia_maxcount to limit the number of bytes for the
  result.  This maximum size represents all of the data being returned
  within the GETDEVICEINFO4resok structure and includes the XDR
  overhead.  The server may return less data.  If the server is unable
  to return the information within the gdia_maxcount limit, the error
  NFS4ERR_TOOSMALL will be returned."

And for GETDEVICELIST:

"The client provides gdla_maxcount to limit the number of bytes for the
  result.  This maximum size represents all of the data being returned
  within the GETDEVICELIST4resok structure and includes the XDR
  overhead.  The server may return less data.  If the server is unable
  to return a single entry device list item within the gdla_maxcount
  limit, the error NFS4ERR_TOOSMALL will be returned."

The remaining suggestions of adding NFS4ERR_TOOSMALL to the
return union is fine with me.

Spencer

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