diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-03-05 15:49:55 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-03-05 16:58:37 +0100 |
commit | 47ea2de2d68b6c5319308b7de1980f463b7c125c (patch) | |
tree | 75f07fa987f3811b82799dd884a57a15f9ccc484 /block.c | |
parent | f47c3f5a800a927238d20de9f99b5c77f0bc3fe0 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |