diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-07-16 16:31:57 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-07-17 03:06:12 +0200 |
commit | 02e1215f9f72ad8c087e21a5701bea0ac18fafd4 (patch) | |
tree | 26b317c316a0d37e04ac1d81116d61cfe7138f3e /fs/nfsd/xdr.h | |
parent | nfsd: eliminate nfsd4_init_callback (diff) | |
download | linux-02e1215f9f72ad8c087e21a5701bea0ac18fafd4.tar.xz linux-02e1215f9f72ad8c087e21a5701bea0ac18fafd4.zip |
nfsd: Avoid taking state_lock while holding inode lock in nfsd_break_one_deleg
state_lock is a heavily contended global lock. We don't want to grab
that while simultaneously holding the inode->i_lock.
Add a new per-nfs4_file lock that we can use to protect the
per-nfs4_file delegation list. Hold that while walking the list in the
break_deleg callback and queue the workqueue job for each one.
The workqueue job can then take the state_lock and do the list
manipulations without the i_lock being held prior to starting the
rpc call.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr.h')
0 files changed, 0 insertions, 0 deletions