* [PATCH 1/1] block-common: fix BDRV_WANT_PRECISE duplicating BDRV_WANT_OFFSET_VALID
@ 2026-07-24 16:11 Denis V. Lunev
2026-07-28 16:29 ` Kevin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Denis V. Lunev @ 2026-07-24 16:11 UTC (permalink / raw)
To: qemu-block, qemu-devel; +Cc: den, Eric Blake, Stefan Hajnoczi
Should OR in BDRV_WANT_ALLOCATED instead.
Actually there is not problem within the code right now as the value is
used as enum rather than flags but that is for now. Let us stay on the
safe side.
Fixes: c33159dec790 ("block: Expand block status mode from bool to flags")
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Eric Blake <eblake@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
---
NOTE: technically we can just remove extra BDRV_WANT_OFFSET_VALID but for me
proposed change seems more logically correct.
include/block/block-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/block/block-common.h b/include/block/block-common.h
index 895ea17541..3932ff8615 100644
--- a/include/block/block-common.h
+++ b/include/block/block-common.h
@@ -351,7 +351,7 @@ typedef enum {
#define BDRV_WANT_OFFSET_VALID BDRV_BLOCK_OFFSET_VALID
#define BDRV_WANT_ALLOCATED BDRV_BLOCK_ALLOCATED
#define BDRV_WANT_PRECISE (BDRV_WANT_ZERO | BDRV_WANT_OFFSET_VALID | \
- BDRV_WANT_OFFSET_VALID)
+ BDRV_WANT_ALLOCATED)
typedef QTAILQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) BlockReopenQueue;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] block-common: fix BDRV_WANT_PRECISE duplicating BDRV_WANT_OFFSET_VALID
2026-07-24 16:11 [PATCH 1/1] block-common: fix BDRV_WANT_PRECISE duplicating BDRV_WANT_OFFSET_VALID Denis V. Lunev
@ 2026-07-28 16:29 ` Kevin Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2026-07-28 16:29 UTC (permalink / raw)
To: Denis V. Lunev; +Cc: qemu-block, qemu-devel, Eric Blake, Stefan Hajnoczi
Am 24.07.2026 um 18:11 hat Denis V. Lunev geschrieben:
> Should OR in BDRV_WANT_ALLOCATED instead.
>
> Actually there is not problem within the code right now as the value is
> used as enum rather than flags but that is for now. Let us stay on the
> safe side.
>
> Fixes: c33159dec790 ("block: Expand block status mode from bool to flags")
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Eric Blake <eblake@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
Thanks, applied to the block-next branch for QEMU 11.2.
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-28 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 16:11 [PATCH 1/1] block-common: fix BDRV_WANT_PRECISE duplicating BDRV_WANT_OFFSET_VALID Denis V. Lunev
2026-07-28 16:29 ` Kevin Wolf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.