Hi Olaf,
>>>>> " " == Olaf Kirch <okir@suse.de> writes:
> --- linux/fs/lockd/svclock.c.locks Mon Jun 17 13:32:21 2002
> +++ linux/fs/lockd/svclock.c Mon Jun 17 13:37:36 2002
> @@ -62,8 +62,8 @@
> nlmsvc_remove_block(block);
> bp = &nlm_blocked; if (when != NLM_NEVER) {
> - if ((when += jiffies) == NLM_NEVER)
> - when ++;
> + if ((when += jiffies) > NLM_NEVER)
> + when = NLM_NEVER;
> while ((b = *bp) &&
> time_before_eq(b->b_when,when))
> bp = &b->b_next;
> } else
I disagree. As it stands, NLM_NEVER == (~(unsigned long)0), and "when"
is unsigned long, so the only thing we need to protect against is if
we hit the 'magic value' NLM_NEVER. Note that the time_before_eq()
comparison ensures that we cope well with jiffy wraparound etc, so the
entry should *not* in fact get put at the end of the list as you
claimed.
With the above change (plus your change to set NLM_NEVER=0x7fffffff),
we end up never retrying locks that just happen to have been put on
the list at a time when the value of 'jiffies' happens to be > 0x7fffffff.
-
The other fix for fs/locks.c looks reasonable AFAICS (but perhaps
Matthew wants to take a look?)
-
Concerning the fix implementing GRANTED_RES: I fully agree we need
it. I've just never had the time, and it's the sort of thing that
the Connectathon tests don't keep nagging at you with ;-)...
Patrice Dumas recently did some work on implementing this both for
NLMv1,2,3 and NLM4, so I was planning on integrating his changes into
2.4.20.
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:43 EST