Skip to content

nfsv4 compound status

Benny Halevy linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nfs: return negative error value from nfs{,4}_stat_to_errnofs/nfs/nfs2xdr.c fs/nfs/nfs3xdr.c fs/nfs/nfs4xdr.c+95 -950 replies
1/2nfs: return nfs4 compound header status on op header decoding errorfs/nfs/nfs4xdr.c include/linux/sunrpc/xdr.h+24 -70 replies
2/2nfs: use compound hdr.status to override op status.fs/nfs/nfs4xdr.c+68 -62 replies
2/2nfs: use compound hdr.status to override op status.fs/nfs/nfs4xdr.c+40 -4416 replies
2/2nfs: remove incorrect usage of nfs4 compound response hdr.statusfs/nfs/nfs4xdr.c+0 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] nfsv4 compound status

Two patches in this patchset implement what we discussed last month:
http://linux-nfs.org/pipermail/nfsv4/2008-February/007945.html

[PATCH 1/2] nfs: return negative error value from nfs{,4}_stat_to_errno

All use sites for nfs{,4}_stat_to_errno negate their return value. It's more efficient to return a negative error from the stat_to_errno convertors rather than negating its return value everywhere. This also produces slightly smaller code.

[PATCH 2/2] nfs: use compound hdr.status to override op status.

The compound header status must be equivalent to the status of the last operation in the compound results. In certain cases like lack of resources or xdr decoding error, the nfs server may return a non-zero status in the compound header which is not returned by any operation. In this case we would notice that today when looking for the respective operations code in the results and we return -EIO when we cannot find it. This patch fixes that by returning the status available in the comound header instead.

This patch also fixes 3 call sites where we looked at the comound hdr.status in the success case which is useless (yet benign). These are nfs4_xdr_dec_{fsinfo,setclientid,setclientid_confirm}

Benny