From 47ea2de2d68b6c5319308b7de1980f463b7c125c Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 5 Mar 2014 15:49:55 +0100 Subject: block: Fix bs->request_alignment assertion for bs->sg=1 For sg backends, bs->request_alignment is meaningless and may be 0. Signed-off-by: Kevin Wolf Reviewed-by: Benoit Canet Acked-by: Paolo Bonzini --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block.c') diff --git a/block.c b/block.c index 38bbdf3..f01b91c 100644 --- a/block.c +++ b/block.c @@ -935,7 +935,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file, bdrv_refresh_limits(bs); assert(bdrv_opt_mem_align(bs) != 0); - assert(bs->request_alignment != 0); + assert((bs->request_alignment != 0) || bs->sg); #ifndef _WIN32 if (bs->is_temporary) { -- cgit v1.1