[Gluster-devel] posix-locks bugs

LI Daobing lidaobing at gmail.com
Fri Feb 22 02:17:52 UTC 2008


On Sat, Feb 16, 2008 at 6:42 PM, Anand Avati <avati at zresearch.com> wrote:
> Timo,
>   patch-666 fixes this. Thanks for the pointer!
in the tla log[1], it said that this bug is discovered by me. but it's not true.

2008-02-15 18:54:10 GMT Vikas Gorur <vikas at 80x25.org>   patch-666

      changed ULONG_MAX to LLONG_MAX in posix-locks.c

    From LI Daobing:

    > if (flock->l_len == 0)
    >   lock->fl_end = ULONG_MAX;

    > fl_end is "signed long long" type pretty much everywhere. The main bug
    > here is that with 64bit systems ULONG_MAX gets converted to -1, and
    > l_len=0 locks break completely.

    > So, this should work better:
    > lock->fl_end = LLONG_MAX;

    Thanks to LI Daobing for this observation.

    modified files:

Best Regards,
 LI Daobing

More information about the Gluster-devel mailing list