NFS: Unimplemented CANCEL conditions in client lockd

Ben 'The Con Man' Kahn (xkahn@cybersites.com)
Tue, 9 Feb 1999 13:00:29 -0500 (EST)


I'm still trying to get IRIX/Linux to work, and now that Alan Cox
has fixed the cookie size bug, I've discovered another problem.

I get this message in my system log:

lockd: weird return 1 for CANCEL call

I found the message in /fs/lockd/clntproc.c:

switch (req->a_res.status) {
case NLM_LCK_GRANTED:
case NLM_LCK_DENIED_GRACE_PERIOD:
/* Everything's good */
break;
case NLM_LCK_DENIED_NOLOCKS:
dprintk("lockd: CANCEL failed (server has no locks)\n");
goto retry_cancel;
default:
printk(KERN_NOTICE "lockd: weird return %d for CANCEL call\n",
req->a_res.status);
}

I looked for the other cases for status and got:

/* Return states for NLM */
enum {
NLM_LCK_GRANTED = 0,
NLM_LCK_DENIED,
NLM_LCK_DENIED_NOLOCKS,
NLM_LCK_BLOCKED,
NLM_LCK_DENIED_GRACE_PERIOD,
};

So NLM_LCK_BLOCKED and NLM_LCK_DENIED are not being handled. (And
I'm getting NLM_LCK_DENIED errors.) I checked the RFCs and it looks like
we should just retry in this case. (It's supposed to be for temporary
failures.) If so, I'm going to change the code to read:

switch (req->a_res.status) {
case NLM_LCK_GRANTED:
case NLM_LCK_DENIED_GRACE_PERIOD:
/* Everything's good */
break;
case NLM_LCK_DENIED_NOLOCKS:
dprintk("lockd: CANCEL failed (server has no locks)\n");
goto retry_cancel;
+ case NLM_LCK_DENIED:
+ dprintk("lockd: CANCEL failed (general error)\n");
+ goto retry_cancel;
default:
printk(KERN_NOTICE "lockd: weird return %d for CANCEL call\n",
req->a_res.status);
}

However, I'm not sure this is correct. Why isn't this case
handled already? Right now, the SGI NFS server has 1005 nfsd processes
hanging on some reply from us, and my Linux boxes have a number of
processes blocked on a flock call as well.

-Ben

------------------------------------ |\ _,,,--,,_ ,) ----------
Benjamin Kahn /,`.-'`' -, ;-;;'
(212) 924 - 2220 |,4- ) )-,_ ) /\
ben@cybersites.com --------------- '---''(_/--' (_/-' ---------------
Drawing on my fine command of language, I said nothing.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/