* [Qemu-devel] [PATCH] block: assert that bs->request_alignment is a power of 2
@ 2016-05-30 11:59 Peter Lieven
2016-05-31 18:28 ` Eric Blake
2016-06-02 14:47 ` Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Peter Lieven @ 2016-05-30 11:59 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, kwolf, mreitz, Peter Lieven
at least bdrv_co_preadv/pwritev expect this.
Signed-off-by: Peter Lieven <pl@kamp.de>
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 736432f..f54bc25 100644
--- a/block.c
+++ b/block.c
@@ -1018,7 +1018,7 @@ static int bdrv_open_common(BlockDriverState *bs, BdrvChild *file,
assert(bdrv_opt_mem_align(bs) != 0);
assert(bdrv_min_mem_align(bs) != 0);
- assert((bs->request_alignment != 0) || bdrv_is_sg(bs));
+ assert(is_power_of_2(bs->request_alignment) || bdrv_is_sg(bs));
qemu_opts_del(opts);
return 0;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: assert that bs->request_alignment is a power of 2
2016-05-30 11:59 [Qemu-devel] [PATCH] block: assert that bs->request_alignment is a power of 2 Peter Lieven
@ 2016-05-31 18:28 ` Eric Blake
2016-06-02 14:47 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2016-05-31 18:28 UTC (permalink / raw)
To: Peter Lieven, qemu-block; +Cc: kwolf, qemu-devel, mreitz
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
On 05/30/2016 05:59 AM, Peter Lieven wrote:
> at least bdrv_co_preadv/pwritev expect this.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
And my work on converting write_zeroes to a byte interface will also
exploit it.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: assert that bs->request_alignment is a power of 2
2016-05-30 11:59 [Qemu-devel] [PATCH] block: assert that bs->request_alignment is a power of 2 Peter Lieven
2016-05-31 18:28 ` Eric Blake
@ 2016-06-02 14:47 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2016-06-02 14:47 UTC (permalink / raw)
To: Peter Lieven; +Cc: qemu-block, qemu-devel, mreitz
Am 30.05.2016 um 13:59 hat Peter Lieven geschrieben:
> at least bdrv_co_preadv/pwritev expect this.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-02 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30 11:59 [Qemu-devel] [PATCH] block: assert that bs->request_alignment is a power of 2 Peter Lieven
2016-05-31 18:28 ` Eric Blake
2016-06-02 14:47 ` Kevin Wolf
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).