summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-11-29 11:40:43 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-12-03 09:59:00 -0500
commit8ce54e0d82730ece61737c9fd7b61b28ab8c3390 (patch)
tree7a3cc8c0fea766d99cb93539ed3953b232767fc4 /fs/nfsd/state.h
parent269de30f10604710dde8d544748b5b6c748b7de8 (diff)
downloadop-kernel-dev-8ce54e0d82730ece61737c9fd7b61b28ab8c3390.zip
op-kernel-dev-8ce54e0d82730ece61737c9fd7b61b28ab8c3390.tar.gz
NFSD: Fault injection operations take a per-client forget function
The eventual goal is to forget state based on ip address, so it makes sense to call this function in a for-each-client loop until the correct amount of state is forgotten. I also use this patch as an opportunity to rename the forget function from "func()" to "forget()". Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index b542bf2..423ac64 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -501,11 +501,13 @@ extern void nfsd4_record_grace_done(struct nfsd_net *nn, time_t boot_time);
#ifdef CONFIG_NFSD_FAULT_INJECTION
int nfsd_fault_inject_init(void);
void nfsd_fault_inject_cleanup(void);
-void nfsd_forget_clients(u64);
-void nfsd_forget_locks(u64);
-void nfsd_forget_openowners(u64);
-void nfsd_forget_delegations(u64);
-void nfsd_recall_delegations(u64);
+u64 nfsd_for_n_state(u64, u64 (*)(struct nfs4_client *, u64));
+
+u64 nfsd_forget_client(struct nfs4_client *, u64);
+u64 nfsd_forget_client_locks(struct nfs4_client*, u64);
+u64 nfsd_forget_client_openowners(struct nfs4_client *, u64);
+u64 nfsd_forget_client_delegations(struct nfs4_client *, u64);
+u64 nfsd_recall_client_delegations(struct nfs4_client *, u64);
#else /* CONFIG_NFSD_FAULT_INJECTION */
static inline int nfsd_fault_inject_init(void) { return 0; }
static inline void nfsd_fault_inject_cleanup(void) {}
OpenPOWER on IntegriCloud