26 Jul
2021
26 Jul
'21
1:59 p.m.
On Sat, Jul 24, 2021 at 02:06:16PM +0100, Richard W.M. Jones wrote:
$ nbdkit sparse-random 4G --filter=cow --run 'nbdinfo --map $uri' nbdkit: cow.c:591: cow_extents: Assertion `count > 0' failed.
This is caused because nbdinfo calls us with count = 0xfffffe00 which is rounded up to the next boundary and overflows (so count = 0).
Use a 64 bit variable for count to allow rounding up. --- tests/Makefile.am | 2 ++ filters/cow/cow.c | 16 +++++++++--- tests/test-cow-extents-large.sh | 46 +++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-)
Ack. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org