* lock reclaims outside grace period @ 2008-04-29 21:57 J. Bruce Fields 2008-04-29 22:18 ` Trond Myklebust 0 siblings, 1 reply; 5+ messages in thread From: J. Bruce Fields @ 2008-04-29 21:57 UTC (permalink / raw) To: linux-nfs Current lockd code appears to reject regular locks done during the grace period, but not reclaims that come outside of the grace period. (That's based on inspecting the code--I haven't run tests.) That seems like an obvious bug. (We're not giving the client any way to determine whether conflicting locks might have been granted.) Can we fix it, or is there a chance that people have been depending on this behavior? (Maybe for failing over to an already-active server??) --b. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: lock reclaims outside grace period 2008-04-29 21:57 lock reclaims outside grace period J. Bruce Fields @ 2008-04-29 22:18 ` Trond Myklebust [not found] ` <1209507531.8321.11.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Trond Myklebust @ 2008-04-29 22:18 UTC (permalink / raw) To: J. Bruce Fields; +Cc: linux-nfs On Tue, 2008-04-29 at 17:57 -0400, J. Bruce Fields wrote: > Current lockd code appears to reject regular locks done during the grace > period, but not reclaims that come outside of the grace period. > > (That's based on inspecting the code--I haven't run tests.) > > That seems like an obvious bug. (We're not giving the client any way to > determine whether conflicting locks might have been granted.) > > Can we fix it, or is there a chance that people have been depending on > this behavior? (Maybe for failing over to an already-active server??) Sorry, but I really don't care if anyone has been relying on it: that is a _major_ bug and needs to be fixed ASAP. Trond ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1209507531.8321.11.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>]
* Re: lock reclaims outside grace period [not found] ` <1209507531.8321.11.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org> @ 2008-04-30 0:03 ` J. Bruce Fields 2008-04-30 0:45 ` Wendy Cheng 2008-05-02 20:04 ` J. Bruce Fields 0 siblings, 2 replies; 5+ messages in thread From: J. Bruce Fields @ 2008-04-30 0:03 UTC (permalink / raw) To: Trond Myklebust; +Cc: linux-nfs On Tue, Apr 29, 2008 at 03:18:51PM -0700, Trond Myklebust wrote: > > On Tue, 2008-04-29 at 17:57 -0400, J. Bruce Fields wrote: > > Current lockd code appears to reject regular locks done during the grace > > period, but not reclaims that come outside of the grace period. > > > > (That's based on inspecting the code--I haven't run tests.) > > > > That seems like an obvious bug. (We're not giving the client any way to > > determine whether conflicting locks might have been granted.) > > > > Can we fix it, or is there a chance that people have been depending on > > this behavior? (Maybe for failing over to an already-active server??) > > Sorry, but I really don't care if anyone has been relying on it: that is > a _major_ bug and needs to be fixed ASAP. OK, good, I'll do some tests to confirm and then submit a patch. When I ran across this I checked what specs I could find (mostly wondering which error to return), and was surprised to find no mention of this case. For example, from the Open Group XNFS spec (http://www.opengroup.org/onlinepubs/9629799/): "If "reclaim" is true, then the server will assume this is a request to re-establish a previous lock (for example, after the server has crashed and rebooted). During the grace period the server will only accept locks with "reclaim" set to true." But they don't state the converse. And LCK_DENIED_GRACE_PERIOD "Indicates that the procedure failed because the server host has recently been rebooted and the server NLM is re-establishing existing locks, and is not yet ready to accept normal service requests." But absent an objection I suppose I'll use LCK_DENIED_GRACE_PERIOD for the other case too. Anyway, it all made me worry whether ignoring the late-reclaim case was actually standard behavior. It wouldn't be the only weird thing about NLM. --b. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: lock reclaims outside grace period 2008-04-30 0:03 ` J. Bruce Fields @ 2008-04-30 0:45 ` Wendy Cheng 2008-05-02 20:04 ` J. Bruce Fields 1 sibling, 0 replies; 5+ messages in thread From: Wendy Cheng @ 2008-04-30 0:45 UTC (permalink / raw) To: J. Bruce Fields; +Cc: Trond Myklebust, linux-nfs J. Bruce Fields wrote: > On Tue, Apr 29, 2008 at 03:18:51PM -0700, Trond Myklebust wrote: > >> On Tue, 2008-04-29 at 17:57 -0400, J. Bruce Fields wrote: >> >>> Current lockd code appears to reject regular locks done during the grace >>> period, but not reclaims that come outside of the grace period. >>> >>> (That's based on inspecting the code--I haven't run tests.) >>> >>> That seems like an obvious bug. (We're not giving the client any way to >>> determine whether conflicting locks might have been granted.) >>> >>> Can we fix it, or is there a chance that people have been depending on >>> this behavior? (Maybe for failing over to an already-active server??) >>> >> Sorry, but I really don't care if anyone has been relying on it: that is >> a _major_ bug and needs to be fixed ASAP. >> > > OK, good, I'll do some tests to confirm and then submit a patch. > I can't disagree - but do prepare people start to ask why after kernel version 2.6.x, they have to extend grace period to get NFS locking works :) ... -- Wendy ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: lock reclaims outside grace period 2008-04-30 0:03 ` J. Bruce Fields 2008-04-30 0:45 ` Wendy Cheng @ 2008-05-02 20:04 ` J. Bruce Fields 1 sibling, 0 replies; 5+ messages in thread From: J. Bruce Fields @ 2008-05-02 20:04 UTC (permalink / raw) To: Trond Myklebust; +Cc: linux-nfs On Tue, Apr 29, 2008 at 08:03:49PM -0400, bfields wrote: > On Tue, Apr 29, 2008 at 03:18:51PM -0700, Trond Myklebust wrote: > > > > On Tue, 2008-04-29 at 17:57 -0400, J. Bruce Fields wrote: > > > Current lockd code appears to reject regular locks done during the grace > > > period, but not reclaims that come outside of the grace period. > > > > > > (That's based on inspecting the code--I haven't run tests.) > > > > > > That seems like an obvious bug. (We're not giving the client any way to > > > determine whether conflicting locks might have been granted.) > > > > > > Can we fix it, or is there a chance that people have been depending on > > > this behavior? (Maybe for failing over to an already-active server??) > > > > Sorry, but I really don't care if anyone has been relying on it: that is > > a _major_ bug and needs to be fixed ASAP. > > OK, good, I'll do some tests to confirm and then submit a patch. Well, I figured the easiest way to reproduce the problem would be just by acquiring a lock on a client, then playing tricks with the network to cause it to miss the grace period. But I'm not getting statd to work--or at least, I'm not seeing any statd activity on the network. There must be something basic wrong with my configuration, but I haven't found it yet. --b. > > When I ran across this I checked what specs I could find (mostly > wondering which error to return), and was surprised to find no mention > of this case. For example, from the Open Group XNFS spec > (http://www.opengroup.org/onlinepubs/9629799/): > > "If "reclaim" is true, then the server will assume this is a > request to re-establish a previous lock (for example, after the > server has crashed and rebooted). During the grace period the > server will only accept locks with "reclaim" set to true." > > But they don't state the converse. > > And LCK_DENIED_GRACE_PERIOD "Indicates that the procedure failed because > the server host has recently been rebooted and the server NLM is > re-establishing existing locks, and is not yet ready to accept normal > service requests." But absent an objection I suppose I'll use > LCK_DENIED_GRACE_PERIOD for the other case too. > > Anyway, it all made me worry whether ignoring the late-reclaim case was > actually standard behavior. It wouldn't be the only weird thing about > NLM. > > --b. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-05-02 20:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 21:57 lock reclaims outside grace period J. Bruce Fields
2008-04-29 22:18 ` Trond Myklebust
[not found] ` <1209507531.8321.11.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-04-30 0:03 ` J. Bruce Fields
2008-04-30 0:45 ` Wendy Cheng
2008-05-02 20:04 ` J. Bruce Fields
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.