Messages in this thread | | | From | Jeff Uphoff <> | Date | Wed, 10 Feb 1999 18:52:19 -0800 (PST) | Subject | Re: NFS: Unimplemented CANCEL conditions in client lockd |
| |
"BCMK" == Ben 'The Con Man' Kahn <xkahn@cybersites.com> writes:
BCMK> I found the message in /fs/lockd/clntproc.c: BCMK> switch (req->a_res.status) { BCMK> case NLM_LCK_GRANTED: BCMK> case NLM_LCK_DENIED_GRACE_PERIOD: BCMK> /* Everything's good */ BCMK> break; BCMK> case NLM_LCK_DENIED_NOLOCKS:
Interesting: The X/Open spec. says that the three return codes for NLM_CANCEL are _GRANTED (success), _DENIED (failure), and _DENIED_GRACE_PERIOD (call back later).
_DENIED_NOLOCKS is not listed as one of the possible (i.e. valid) return codes, which makes sense when you think about it: cancels shouldn't fail due to locking resources having been exhausted.
Does anyone know if this was an accidental deviation, or was it done for some deliberate reason? Olaf? H.J.?
BCMK> So NLM_LCK_BLOCKED and NLM_LCK_DENIED are not being handled. (And BCMK> I'm getting NLM_LCK_DENIED errors.) I checked the RFCs and it looks like BCMK> we should just retry in this case. (It's supposed to be for temporary BCMK> failures.) If so, I'm going to change the code to read:
BCMK> switch (req->a_res.status) { BCMK> case NLM_LCK_GRANTED: BCMK> case NLM_LCK_DENIED_GRACE_PERIOD: BCMK> /* Everything's good */ BCMK> break; BCMK> case NLM_LCK_DENIED_NOLOCKS: BCMK> dprintk("lockd: CANCEL failed (server has no locks)\n"); BCMK> goto retry_cancel;
Arguably, that last case should be removed and picked up by the default: printk notice (as an anomaly).
BCMK> + case NLM_LCK_DENIED: BCMK> + dprintk("lockd: CANCEL failed (general error)\n"); BCMK> + goto retry_cancel;
And that should replace it.
--Up, inviting correction if he's misunderstanding something.
- 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/
| |