From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, pl@kamp.de
Subject: [Qemu-devel] [PATCH 2/2] block: Fix bs->request_alignment assertion for bs->sg=1
Date: Wed, 5 Mar 2014 16:00:49 +0100 [thread overview]
Message-ID: <1394031649-31915-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1394031649-31915-1-git-send-email-kwolf@redhat.com>
For sg backends, bs->request_alignment is meaningless and may be 0.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
1.8.1.4
next prev parent reply other threads:[~2014-03-05 15:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 15:00 [Qemu-devel] [PATCH 0/2] iscsi: Fix bs->request_alignment failure on LUN 0 Kevin Wolf
2014-03-05 15:00 ` [Qemu-devel] [PATCH 1/2] iscsi: Use bs->sg for everything else than disks Kevin Wolf
2014-03-05 15:33 ` Benoît Canet
2014-03-05 15:41 ` Kevin Wolf
2014-03-05 15:47 ` Benoît Canet
2014-03-05 16:02 ` Peter Lieven
2014-03-05 16:21 ` Kevin Wolf
2014-03-05 15:00 ` Kevin Wolf [this message]
2014-03-05 15:34 ` [Qemu-devel] [PATCH 2/2] block: Fix bs->request_alignment assertion for bs->sg=1 Benoît Canet
2014-03-05 15:31 ` [Qemu-devel] [PATCH 0/2] iscsi: Fix bs->request_alignment failure on LUN 0 Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394031649-31915-3-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).