nfsd: add more granular locking to forget_openowners fault injector

...instead of relying on the client_mutex.

Also, fix up the printk output that is generated when the file is read.
It currently says that it's reporting the number of open files, but
it's actually reporting the number of openowners.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
Jeff Layton
2014-07-30 08:27:22 -04:00
committed by J. Bruce Fields
parent 016200c373
commit 82e05efaec
3 changed files with 122 additions and 15 deletions

View File

@@ -488,11 +488,14 @@ u64 nfsd_inject_forget_client_locks(struct nfsd_fault_inject_op *,
struct sockaddr_storage *, size_t);
u64 nfsd_inject_forget_locks(struct nfsd_fault_inject_op *, u64);
u64 nfsd_forget_client_openowners(struct nfs4_client *, u64);
u64 nfsd_inject_print_openowners(struct nfsd_fault_inject_op *);
u64 nfsd_inject_forget_client_openowners(struct nfsd_fault_inject_op *,
struct sockaddr_storage *, size_t);
u64 nfsd_inject_forget_openowners(struct nfsd_fault_inject_op *, u64);
u64 nfsd_forget_client_delegations(struct nfs4_client *, u64);
u64 nfsd_recall_client_delegations(struct nfs4_client *, u64);
u64 nfsd_print_client_openowners(struct nfs4_client *, u64);
u64 nfsd_print_client_delegations(struct nfs4_client *, u64);
#else /* CONFIG_NFSD_FAULT_INJECTION */
static inline int nfsd_fault_inject_init(void) { return 0; }