On 07/18/2017 01:09 AM, Philippe Mathieu-Daudé wrote: > Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci > > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > qemu-img.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> > > diff --git a/qemu-img.c b/qemu-img.c > index 182e697f81..6f5f956302 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -3804,7 +3804,7 @@ static void bench_cb(void *opaque, int ret) > b->in_flight--; > > /* Time for flush? Drain queue if requested, then flush */ > - if (b->flush_interval && remaining % b->flush_interval == 0) { > + if (b->flush_interval && QEMU_IS_ALIGNED(remaining, > b->flush_interval)) { > if (!b->in_flight || !b->drain_on_flush) { > BlockCompletionFunc *cb; > > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature