* [RFC][PATCH v2] NLM: Sending nfslock request fail should not be process as blocked
@ 2010-07-01 9:54 Mi Jinlong
0 siblings, 0 replies; only message in thread
From: Mi Jinlong @ 2010-07-01 9:54 UTC (permalink / raw)
To: NFSv3 list, Trond.Myklebust, J. Bruce Fields, Chuck Lever,
Jeff Layton, Mi Jinlong
hi,
Sorry for sending this patch third times.
About this patch, I have discussed with Trond before.
He said "An unlock does not guarantee that the server will cancel the blocked
lock request.", but when server receive an UNLOCK request, it will try to
cancel the lock at first, and then unlock the file.
codes as follows:
...
567 nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock)
568 {
....
578 /* First, cancel any lock that might be there */
579 nlmsvc_cancel_blocked(file, lock);
...
as before, the UNLOCK request means it contain a CANCEL request.
So, I don't know the reason in detail.
Waiting for some better analysis. Thanks.
-------------
If local reason cause nfslock request is sent fail(means status < 0,
but resp->status not be reset), the request will be process as blocked
at the kernel.
If the network partition cause the LOCK request be sent fail, the
kernel will processed it as being blocked right now, but sending
an UNLOCK request is needed but CANCEL request here.
Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
---
fs/lockd/clntproc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 7932c39..b79c8b1 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -536,7 +536,7 @@ again:
* Initialise resp->status to a valid non-zero value,
* since 0 == nlm_lck_granted
*/
- resp->status = nlm_lck_blocked;
+ resp->status = nlm_lck_denied_nolocks;
for(;;) {
/* Reboot protection */
fl->fl_u.nfs_fl.state = host->h_state;
--
1.7.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-01 9:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01 9:54 [RFC][PATCH v2] NLM: Sending nfslock request fail should not be process as blocked Mi Jinlong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).