aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2014-03-05 15:49:55 +0100
committerKevin Wolf <kwolf@redhat.com>2014-03-05 16:58:37 +0100
commit47ea2de2d68b6c5319308b7de1980f463b7c125c (patch)
tree75f07fa987f3811b82799dd884a57a15f9ccc484 /block.c
parentf47c3f5a800a927238d20de9f99b5c77f0bc3fe0 (diff)
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 <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block.c b/block.c
index 38bbdf3083..f01b91cef1 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) {