On May 14, 2014, at 2:11 PM, Steve Wise <[email protected]> wrote:

> 
>>> 
>>>> If you print ch_count, it is 2 for NFS WRITEs from a Linux client,
>>>> no matter how large the write payload is. Therefore I think the check
>>>> as it is written is not particularly useful.
>>> 
>>> Why are there 2?
>> 
>> The first chunk lists the pages the server is to read, and the second
>> chunk has the zero pad for XDR alignment.
>> 
>> If pad optimization is enabled on the client, there is just 1 chunk in
>> the RPC's Read list.
>> 
> 
> So the code as it stands violates the RFC by sending 2 chunks?

The Linux client is non-compliant because it sends two chunks. A compliant 
server ignores the second chunk, so this is functionally harmless (but a waste 
of resources).

The Linux server is non-compliant because it _requires_ the XDR pad chunk. A 
compliant client (eg. Linux with pad optimization enabled) does not 
interoperate with it.

> And if I change the server
> to only consume 1, then everything unaligned will break?

If you change the server to consume only the first chunk, but do not also make 
it deal with XDR padding as recommended in chapter 3 of RFC 5666, then WRITEs 
with a length that is not a multiple of four will fail. SYMLINKs with a large 
payload will also have this problem.

--
Chuck Lever
[email protected]



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to