★ wanayoo — archive 1999 http://kernelnotes.org/patch/21-p0517.htmlNouvelle recherche | Portail wanayoo

NFS Write Fix for data-length not a multiple of 4

Roderich Schupp (roderich@nodebonn)
Mon May 26 19:52:00 1997

[Home] [Linux 2.0] [Linux 2.1] [Information] [Software] [Distributions] [Links]

21-nfs-write-fix.patch
Yup, this fixes the NFS writes with 0 bytes data! But I also have problems with NFS writes where the data length is not a multiple of 4 (e.g. the last odd-sized write request when doing a file copy). Problem seems to be that the marshalling code in fs/nfs/nfs2xdr.c does not pad the NFS data up to the next multiple of 4 (as required by the XDR spec). At least some NFS servers don't like this and return a GARBAGE_ARGS RPC error.

The following patch (against 2.1.40) fixes this by adding a third io buffer (containing from 1 to 3 bytes) if padding is necessary. Maybe there's a better way to do this?




[Home] [Up] [Search] [FeedBack]

Copyleft © The LinuxHQ Project. Licensed under the GNU Public License.