I pushed this series upstream, commits 3095d8bad..8627ed08b.
The changes should address everything you mentioned:
* nbdkit_parse_probability now only returns probabilities >= 0
and not NaN or infinite (but they can still be larger than 100%)
* Add Rust bindings for parse_size, parse_bool and parse_probabilities
* next_power_of_2 should now deal with all the corner cases that Eric
described.
* Document that log_2_bits must be called only with powers of 2.
* Change 'rand' local variable to 'randnum' to avoid potential
conflict with stdlib.h.
* Use a local variable to store buf[i] in inner loop.
* Add some suggestions for future enhancements to the filter made by
Eric to the TODO list.
* Add can_fast_zero to the ones filter.
* Add R-b tags.
* Re-test.
Thanks!
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit