[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 01/15] block: Add 'active' field to BlockDeviceInfo
From: |
Eric Blake |
Subject: |
Re: [PATCH v2 01/15] block: Add 'active' field to BlockDeviceInfo |
Date: |
Thu, 30 Jan 2025 13:30:57 -0600 |
User-agent: |
NeoMutt/20250113 |
On Thu, Jan 30, 2025 at 06:12:32PM +0100, Kevin Wolf wrote:
> This allows querying from QMP (and also HMP) whether an image is
> currently active or inactive (in the sense of BDRV_O_INACTIVE).
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> +++ b/block/qapi.c
> @@ -63,6 +63,7 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
> info->file = g_strdup(bs->filename);
> info->ro = bdrv_is_read_only(bs);
> info->drv = g_strdup(bs->drv->format_name);
> + info->active = !bdrv_is_inactive(bs);
Lots of double-negatives - annoying, but I don't see a way around it,
and I agree with your decision to make the public interface use the
positive (active) rather than the negative (inactive), even though the
negative is the unusual case.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
- [PATCH v2 00/15] block: Managing inactive nodes (QSD migration), Kevin Wolf, 2025/01/30
- [PATCH v2 01/15] block: Add 'active' field to BlockDeviceInfo, Kevin Wolf, 2025/01/30
- Re: [PATCH v2 01/15] block: Add 'active' field to BlockDeviceInfo,
Eric Blake <=
- [PATCH v2 02/15] block: Inactivate external snapshot overlays when necessary, Kevin Wolf, 2025/01/30
- [PATCH v2 03/15] migration/block-active: Remove global active flag, Kevin Wolf, 2025/01/30
- [PATCH v2 04/15] block: Don't attach inactive child to active node, Kevin Wolf, 2025/01/30
- [PATCH v2 06/15] block: Fix crash on block_resize on inactive node, Kevin Wolf, 2025/01/30
- [PATCH v2 05/15] block: Allow inactivating already inactive nodes, Kevin Wolf, 2025/01/30