aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJ.Bruce Fields <bfields@fieldses.org>2006-12-13 03:35:27 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:54 -0500
commitca3643171bc6e08b7c4d1f9a2ce659541a01a7fe (patch)
tree2128accc9584e7dd69f6b62c62ef6631f5da231f /include
parent01f3bd1f03599470e4695392b6ae055ed8506978 (diff)
[PATCH] knfsd: nfsd4: pass saved and current fh together into nfsd4 operations
Pass the saved and current filehandles together into all the nfsd4 compound operations. I want a unified interface to these operations so we can just call them by pointer and throw out the huge switch statement. Also I'll eventually want a structure like this--that holds the state used during compound processing--for deferral. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfsd/xdr4.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
index 45ca01b5f844..594b8ca69755 100644
--- a/include/linux/nfsd/xdr4.h
+++ b/include/linux/nfsd/xdr4.h
@@ -44,6 +44,11 @@
44#define NFSD4_MAX_TAGLEN 128 44#define NFSD4_MAX_TAGLEN 128
45#define XDR_LEN(n) (((n) + 3) & ~3) 45#define XDR_LEN(n) (((n) + 3) & ~3)
46 46
47struct nfsd4_compound_state {
48 struct svc_fh current_fh;
49 struct svc_fh save_fh;
50};
51
47struct nfsd4_change_info { 52struct nfsd4_change_info {
48 u32 atomic; 53 u32 atomic;
49 u32 before_ctime_sec; 54 u32 before_ctime_sec;
@@ -437,20 +442,23 @@ extern __be32 nfsd4_process_open1(struct nfsd4_open *open);
437extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp, 442extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp,
438 struct svc_fh *current_fh, struct nfsd4_open *open); 443 struct svc_fh *current_fh, struct nfsd4_open *open);
439extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp, 444extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp,
440 struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, 445 struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc,
441 struct nfs4_stateowner **); 446 struct nfs4_stateowner **);
442extern __be32 nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, 447extern __be32 nfsd4_close(struct svc_rqst *rqstp,
448 struct nfsd4_compound_state *,
443 struct nfsd4_close *close, 449 struct nfsd4_close *close,
444 struct nfs4_stateowner **replay_owner); 450 struct nfs4_stateowner **replay_owner);
445extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp, 451extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp,
446 struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, 452 struct nfsd4_compound_state *, struct nfsd4_open_downgrade *od,
447 struct nfs4_stateowner **replay_owner); 453 struct nfs4_stateowner **replay_owner);
448extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, 454extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *,
449 struct nfsd4_lock *lock, 455 struct nfsd4_lock *lock,
450 struct nfs4_stateowner **replay_owner); 456 struct nfs4_stateowner **replay_owner);
451extern __be32 nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, 457extern __be32 nfsd4_lockt(struct svc_rqst *rqstp,
458 struct nfsd4_compound_state *,
452 struct nfsd4_lockt *lockt); 459 struct nfsd4_lockt *lockt);
453extern __be32 nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, 460extern __be32 nfsd4_locku(struct svc_rqst *rqstp,
461 struct nfsd4_compound_state *,
454 struct nfsd4_locku *locku, 462 struct nfsd4_locku *locku,
455 struct nfs4_stateowner **replay_owner); 463 struct nfs4_stateowner **replay_owner);
456extern __be32 464extern __be32
@@ -458,7 +466,7 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp,
458 struct nfsd4_release_lockowner *rlockowner); 466 struct nfsd4_release_lockowner *rlockowner);
459extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *); 467extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *);
460extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp, 468extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp,
461 struct svc_fh *current_fh, struct nfsd4_delegreturn *dr); 469 struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr);
462#endif 470#endif
463 471
464/* 472/*