[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/9] nbd/server: Support inactive nodes
From: |
Eric Blake |
Subject: |
Re: [PATCH 6/9] nbd/server: Support inactive nodes |
Date: |
Thu, 30 Jan 2025 14:43:19 -0600 |
User-agent: |
NeoMutt/20250113 |
On Wed, Jan 22, 2025 at 12:50:43PM +0100, Kevin Wolf wrote:
> In order to support running an NBD export on inactive nodes, we must
> make sure to return errors for any operations that aren't allowed on
> inactive nodes. Reads are the only operation we know we need for
> inactive images, so to err on the side of caution, return errors for
> everything else, even if some operations could possibly be okay.
Block status might be the only other command I could see being needed,
but I also agree with the approach of not supporting it until we have
a use case in mind (if ever).
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> nbd/server.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> @@ -2920,6 +2921,22 @@ static coroutine_fn int nbd_handle_request(NBDClient
> *client,
> NBDExport *exp = client->exp;
> char *msg;
> size_t i;
> + bool inactive;
> +
> + WITH_GRAPH_RDLOCK_GUARD() {
> + inactive = bdrv_is_inactive(blk_bs(exp->common.blk));
Can the declaration of bool inactive be moved inside the lock guard
block? Not a problem if you want to leave it with all other
declarations, though.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
- [PATCH 0/9] block: Managing inactive nodes (QSD migration), Kevin Wolf, 2025/01/22
- [PATCH 4/9] block/export: Don't ignore image activation error in blk_exp_add(), Kevin Wolf, 2025/01/22
- [PATCH 3/9] block: Support inactive nodes in blk_insert_bs(), Kevin Wolf, 2025/01/22
- [PATCH 2/9] block: Add option to create inactive nodes, Kevin Wolf, 2025/01/22
- [PATCH 6/9] nbd/server: Support inactive nodes, Kevin Wolf, 2025/01/22
- Re: [PATCH 6/9] nbd/server: Support inactive nodes,
Eric Blake <=
- [PATCH 7/9] block: Add blockdev-set-active QMP command, Kevin Wolf, 2025/01/22
- [PATCH 8/9] iotests: Add filter_qtest(), Kevin Wolf, 2025/01/22
- [PATCH 9/9] iotests: Add qsd-migrate case, Kevin Wolf, 2025/01/22
- [PATCH 1/9] block: Allow inactivating already inactive nodes, Kevin Wolf, 2025/01/22
- [PATCH 5/9] block/export: Add option to allow export of inactive nodes, Kevin Wolf, 2025/01/22
- Re: [PATCH 0/9] block: Managing inactive nodes (QSD migration), Eric Blake, 2025/01/30