[Bugs] [Bug 1451033] contrib: timer-wheel 32-bit bug, use builtin_fls, license, etc

bugzilla at redhat.com bugzilla at redhat.com
Tue May 16 00:36:30 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1451033



--- Comment #2 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/17301 committed in release-3.11 by
Shyamsundar Ranganathan (srangana at redhat.com) 
------
commit fd34879c6b4a68e514b8f746f52437f367835ea9
Author: Kaleb S. KEITHLEY <kkeithle at redhat.com>
Date:   Mon May 1 12:39:56 2017 -0400

    contrib/timerwheel: bad 32-bit, use builtin fls(), fix copyright

    It's bad form to remove other people's copyright and license when you
    copy their source for your own use.

    Defining BITS_PER_LONG as 64 is incorrect on 32-bit platforms.

    The mismatch between the unsigned long of the timer and the int
    param to fls() means on 64-bit platforms that any bits set in the
    high 32-bits of the the timer are lost/ignored.

    gf_tw_find_last_bit() is meant to find the last bit in an array of
    longs. It's overkill for gluster's timerwheel  where we only ever pass
    a single long; replacing it with a direct call to fls() which is
    renamed to gf_tw_fls()

    The timer routines are slightly modified from the kernel timer
    functions that first appeared circa 2.6.x in .../kernel/timer.c
    AFAICT.

    find_last_bit() comes from the (linux) kernel (.../lib/find_bit.c
    in 4.x kernels, .../lib/find_last_bit.c in 3.x kernels) but as noted
    above, it is removed with this patch.

    __fls() comes from the linux kernel (.../include/asm-generic/
    bitops/{__fls.h,builtin-__fls.h}

    Restoring/updating the copyright and license to the version from
    the 4.x kernel find_bit.c. (timer.c does not have a license, __fls.h
    and builtin-__fls.h do not have a copyright or license, but the whole
    kernel is licensed under GPLv2 anyway.)

      mainline BUG: none
      Master: https://review.gluster.org/17146

    Change-Id: I2d2defccf1ccc74f55d99e94212747a36a1dff35
    BUG: 1451033
    Signed-off-by: Kaleb S. KEITHLEY <kkeithle at redhat.com>
    Reviewed-on: https://review.gluster.org/17301
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Shyamsundar Ranganathan <srangana at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=9W9qntA1tz&a=cc_unsubscribe


More information about the Bugs mailing list