[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/9] blockjob: introduce block-job-change QMP command
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v3 1/9] blockjob: introduce block-job-change QMP command |
Date: |
Wed, 18 Oct 2023 17:52:17 +0200 |
Am 13.10.2023 um 11:21 hat Fiona Ebner geschrieben:
> which will allow changing job-type-specific options after job
> creation.
>
> In the JobVerbTable, the same allow bits as for set-speed are used,
> because set-speed can be considered an existing change command.
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> diff --git a/job.c b/job.c
> index 72d57f0934..99a2e54b54 100644
> --- a/job.c
> +++ b/job.c
> @@ -80,6 +80,7 @@ bool JobVerbTable[JOB_VERB__MAX][JOB_STATUS__MAX] = {
> [JOB_VERB_COMPLETE] = {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0},
> [JOB_VERB_FINALIZE] = {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0},
> [JOB_VERB_DISMISS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
> + [JOB_VERB_CHANGE] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
> };
I'm not sure if I would have included JOB_STATUS_CREATED, i.e. before
the job has even started, but it's not necessarily a problem. The
implementation just need to be careful to work even in early stages. But
probably the early stages include some part of JOB_STATUS_RUNNING, too,
so they'd have to do this anyway.
Kevin
- [PATCH v3 0/9] mirror: allow switching from background to active mode, Fiona Ebner, 2023/10/13
- [PATCH v3 3/9] block/mirror: move dirty bitmap to filter, Fiona Ebner, 2023/10/13
- [PATCH v3 8/9] blockjob: query driver-specific info via a new 'query' driver method, Fiona Ebner, 2023/10/13
- [PATCH v3 4/9] block/mirror: determine copy_to_target only once, Fiona Ebner, 2023/10/13
- [PATCH v3 6/9] qapi/block-core: use JobType for BlockJobInfo's type, Fiona Ebner, 2023/10/13
- [PATCH v3 5/9] mirror: implement mirror_change method, Fiona Ebner, 2023/10/13