mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
LVM2 mirror repository
https://sourceware.org/lvm2/
919568a223
Use _even_rand() function instead of floor() in _bitset_with_random_bits(). floor() function is missing in dietlibc (on architectures other than x86). Moreover using floor() to clip rand results does not assure even result distribution. _even_rand() uses integer arithmetic only and is designed to return evenly distributed results. > Looks OK to me. It took a while to decipher what is the exact meaning of > the loop in _even_rand (to a non-pseudorandomness-expert) but I am > fairly comfortable with it now. If I understand this correctly, it > rejects numbers that come from an "incomplete" slice of the RAND_MAX > space (considering the number space [0, RAND_MAX] is divided into some > "max"-sized slices and at most a single smaller slice, between [n*max, > RAND_MAX] for suitable n -- numbers from this last slice are discarded > because they could distort the distribution in favour of smaller > numbers). Signed-off-by: Przemyslaw Iskra <sparky <at> pld-linux.org> Reviewed-by: Petr Rockai <prockai <at> redhat.com> |
||
---|---|---|
autoconf | ||
daemons | ||
doc | ||
include | ||
lib | ||
libdm | ||
liblvm | ||
man | ||
old-tests | ||
po | ||
report-generators | ||
reports | ||
scripts | ||
test | ||
tools | ||
udev | ||
unit-tests | ||
configure | ||
configure.in | ||
COPYING | ||
COPYING.LIB | ||
INSTALL | ||
make.tmpl.in | ||
Makefile.in | ||
README | ||
VERSION | ||
VERSION_DM | ||
WHATS_NEW | ||
WHATS_NEW_DM |
This tree contains the LVM2 and device-mapper tools and libraries. For more information about LVM2 read the changelog in the WHATS_NEW file. Installation instructions are in INSTALL. There is no warranty - see COPYING and COPYING.LIB. Tarballs are available from: ftp://sources.redhat.com/pub/lvm2/ To access the CVS tree use: cvs -d :pserver:cvs@sources.redhat.com:/cvs/lvm2 login CVS password: cvs cvs -d :pserver:cvs@sources.redhat.com:/cvs/lvm2 co LVM2 Mailing list for general discussion related to LVM2: linux-lvm@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm Mailing list for LVM2 development, patches and commits: lvm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm Mailing list for device-mapper development, including kernel patches and multipath-tools: dm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel