interruptible_sleep_on in lockd
Subsystems (2)
PATCH 1/1 interruptible_sleep_on in lockd
interruptible_sleep_on looks rather bogus, especially when ignoring whether it actually was interrupted. What about the patch below?
fs/lockd/clntproc.c +5 -2
@@ -254,8 +241,11 @@ msg.rpc_cred =nfs_file_cred (filp); do { - if (host->h_reclaiming && !argp->reclaim) { - interruptible_sleep_on(&host->h_gracewait); + status = wait_event_interruptible(host->h_gracewait, + (!host->h_reclaiming || argp->reclaim)); + if (status) { + if (signalled()) + return -EINTR; continue; }
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 2 lines · Christoph Hellwig
interruptible_sleep_onlooks rather bogus, especially when ignoring whether it actually was interrupted. What about the patch below?
The whole way we handle this whole grace period situation looks dubious. The fact that we have finished reclaiming locks is not the same as saying that the server is out of its grace period.
Something like the following is perhaps more appropriate.
Cheers,
Trond
clntlock.c | 1 - clntproc.c | 46 ++++++++++++++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 17 deletions(-)
fs/lockd/clntlock.c +0 -1
@@ -228,7 +228,6 @@ restart: } host->h_reclaiming =0 ; -wake_up (&host->h_gracewait);/* Now, wake up all processes that sleep on a blocked lock */ for (block = nlm_blocked; block; block = block->b_next) {
fs/lockd/clntproc.c +30 -16
68 lines not on this page · raw message