Skip to content

Commit

Permalink
nfsd4: teach encoders to handle reserve_space failures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J. Bruce Fields committed May 30, 2014
1 parent 082d4bd commit d0a381d
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 66 deletions.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
}
if (op->status == nfserr_replay_me) {
op->replay = &cstate->replay_owner->so_replay;
nfsd4_encode_replay(resp, op);
nfsd4_encode_replay(&resp->xdr, op);
status = op->status = op->replay->rp_status;
} else {
nfsd4_encode_operation(resp, op);
Expand Down
Loading

0 comments on commit d0a381d

Please sign in to comment.