]> git.karo-electronics.de Git - karo-tx-linux.git/commit
nfsd4: teach encoders to handle reserve_space failures
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 30 Jan 2014 22:18:38 +0000 (17:18 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 28 May 2014 18:52:41 +0000 (14:52 -0400)
commitf3266b0ccc93de930c1c5d2b7c0fdc32eb34dc56
treeae273916c2dab17a5b78fa24575988023503342d
parent9662098f1cf6438aa0cfb77568df6d44c1cb0d0a
nfsd4: teach encoders to handle reserve_space failures

We've tried to prevent running out of space with COMPOUND_SLACK_SPACE
and special checking in those operations (getattr) whose result can vary
enormously.

However:
- COMPOUND_SLACK_SPACE may be difficult to maintain as we add
  more protocol.
- BUG_ON or page faulting on failure seems overly fragile.
- Especially in the 4.1 case, we prefer not to fail compounds
  just because the returned result came *close* to session
  limits.  (Though perfect enforcement here may be difficult.)
- I'd prefer encoding to be uniform for all encoders instead of
  having special exceptions for encoders containing, for
  example, attributes.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4xdr.c
fs/nfsd/xdr4.h