[S] Change in ...nfs-ganesha[next]: Return NFS4ERR_REQ_TOO_BIG when a request exceeds ca_maxrequestsize
Oscar Ou has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1246978?usp=email ) Change subject: Return NFS4ERR_REQ_TOO_BIG when a request exceeds ca_maxrequestsize ...................................................................... Return NFS4ERR_REQ_TOO_BIG when a request exceeds ca_maxrequestsize RFC 5661 section 2.10.6.4 states that if a request exceeds ca_maxrequestsize the reply will have the status NFS4ERR_REQ_TOO_BIG, and that a replier MAY return it as the status for the first operation (SEQUENCE), "which means that no operations in the request executed and that the state of the slot in the reply cache is unchanged". That is the variant implemented here, so the check is made before the slot is looked up and locked. The same section also says the replier SHOULD set the error on the operation that exceeds the limit; returning it on SEQUENCE is the explicitly permitted alternative and keeps the reply cache slot untouched, which is why it is preferred here. Fixes pynfs 4.1 st_sequence.testRequestTooBig (SEQ6), which negotiates ca_maxrequestsize = 512 and then sends a COMPOUND carrying a 500 byte LOOKUP name. Before this change the COMPOUND was executed and the test got NFS4ERR_NAMETOOLONG: SEQ6 st_sequence.testRequestTooBig : FAILURE OP_LOOKUP should return NFS4ERR_REQ_TOO_BIG, instead got NFS4ERR_NAMETOOLONG Change-Id: I5a80c49bcb88bd0fcd3b23bfda68b14c91f36b88 Signed-off-by: Oscar Ou <oscarou@synology.com> --- M src/Protocols/NFS/nfs4_op_sequence.c 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/78/1246978/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1246978?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: I5a80c49bcb88bd0fcd3b23bfda68b14c91f36b88 Gerrit-Change-Number: 1246978 Gerrit-PatchSet: 1 Gerrit-Owner: Oscar Ou <oscarou@synology.com>
participants (1)
-
Oscar Ou (GerritHub)