projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f47c3f5
)
block: Fix bs->request_alignment assertion for bs->sg=1
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 5 Mar 2014 14:49:55 +0000
(15:49 +0100)
committer
Kevin Wolf
<kwolf@redhat.com>
Wed, 5 Mar 2014 15:58:37 +0000
(16:58 +0100)
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>
block.c
patch
|
blob
|
history
diff --git
a/block.c
b/block.c
index
38bbdf3
..
f01b91c
100644
(file)
--- 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) {