From bac8088573d7f0a60e8e785aeaa442a1d90de0e4 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Mon, 10 Mar 2014 11:07:22 +0100 Subject: [PATCH 14/16] block: Fix bs->request_alignment assertion for bs->sg=1 RH-Author: Kevin Wolf Message-id: <1394449642-13562-3-git-send-email-kwolf@redhat.com> Patchwork-id: 58064 O-Subject: [RHEL-7.0 qemu-kvm PATCH 2/2] block: Fix bs->request_alignment assertion for bs->sg=1 Bugzilla: 1067784 RH-Acked-by: Juan Quintela RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Paolo Bonzini 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 (cherry picked from commit 47ea2de2d68b6c5319308b7de1980f463b7c125c) Signed-off-by: Kevin Wolf --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Miroslav Rezanina --- block.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 642e8d6..ec8dc90 100644 --- a/block.c +++ b/block.c @@ -847,7 +847,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) { -- 1.7.1