[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 37/40] job: Add query-jobs QMP command
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v2 37/40] job: Add query-jobs QMP command |
Date: |
Tue, 22 May 2018 12:44:24 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 18.05.2018 um 20:22 hat Eric Blake geschrieben:
> On 05/18/2018 08:21 AM, Kevin Wolf wrote:
> > This adds a minimal query-jobs implementation that shouldn't pose many
> > design questions. It can later be extended to expose more information,
> > and especially job-specific information.
> >
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
> > qapi/job.json | 45 +++++++++++++++++++++++++++++++++++++++++++++
> > include/qemu/job.h | 3 +++
> > job-qmp.c | 54
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > job.c | 2 +-
> > 4 files changed, 103 insertions(+), 1 deletion(-)
> >
>
> > +##
> > +# @JobInfo:
> > +#
> > +# Information about a job.
> > +#
> > +# @id: The job identifier
>
> > +##
> > +{ 'struct': 'JobInfo',
> > + 'data': { 'id': 'str', 'type': 'JobType', 'status': 'JobStatus',
> > + 'current-progress': 'int', 'total-progress': 'int',
> > + '*error': 'str' } }
>
> Is it worth exposing whether a job is auto-finalize and auto-complete? Goes
> back to the issue of whether clients of the new job API would ever want/need
> to rely on the auto- features; while clients of the old blockjob API that
> get the auto- features by default will never be calling the new query-jobs
> command.
There are probably more fields that could be exposed. For most of them,
it's not obvious whether we want to expose them, so I went for the
minimal useful information here. We can always add more information to a
query command; but we can't take information away later if it turns out
that exposing it was a bad idea.
Kevin
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready(), (continued)
- [Qemu-block] [PATCH v2 30/40] job: Add job_dismiss(), Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 32/40] job: Add job_transition_to_ready(), Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 34/40] job: Introduce qapi/job.json, Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 33/40] job: Move progress fields to Job, Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 39/40] iotests: Move qmp_to_opts() to VM, Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 37/40] job: Add query-jobs QMP command, Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 38/40] blockjob: Remove BlockJob.driver, Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 36/40] job: Add lifecycle QMP commands, Kevin Wolf, 2018/05/18
- [Qemu-block] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event, Kevin Wolf, 2018/05/18