Message ID | 1464609599-7495-1-git-send-email-pl@kamp.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/30/2016 05:59 AM, Peter Lieven wrote: > at least bdrv_co_preadv/pwritev expect this. > > Signed-off-by: Peter Lieven <pl@kamp.de> > --- > block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake <eblake@redhat.com> And my work on converting write_zeroes to a byte interface will also exploit it.
Am 30.05.2016 um 13:59 hat Peter Lieven geschrieben: > at least bdrv_co_preadv/pwritev expect this. > > Signed-off-by: Peter Lieven <pl@kamp.de> Thanks, applied to the block branch. Kevin
diff --git a/block.c b/block.c index 736432f..f54bc25 100644 --- a/block.c +++ b/block.c @@ -1018,7 +1018,7 @@ static int bdrv_open_common(BlockDriverState *bs, BdrvChild *file, assert(bdrv_opt_mem_align(bs) != 0); assert(bdrv_min_mem_align(bs) != 0); - assert((bs->request_alignment != 0) || bdrv_is_sg(bs)); + assert(is_power_of_2(bs->request_alignment) || bdrv_is_sg(bs)); qemu_opts_del(opts); return 0;
at least bdrv_co_preadv/pwritev expect this. Signed-off-by: Peter Lieven <pl@kamp.de> --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)