qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, alevy@redhat.com, stefanha@redhat.com,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [RfC PATCH 2/2] console: add screendump-device qmp cmd
Date: Tue, 18 Jun 2013 16:47:13 +0200	[thread overview]
Message-ID: <20130618144713.GR7649@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <51C05F91.6020201@redhat.com>

On Tue, Jun 18, 2013 at 03:24:33PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> >> Something like the attached patch?  Which is just the bare minimum I'll
> >> need for screendump.  Basically a one-off bottom half with some monitor
> >> infrastructure (job id, error handling).  So it isn't for big jobs, but
> >> for small jobs which have to wait for something before they execute
> >> (spice-server, guest action, whatever).
> > 
> > I only skimmed over the patch, but you need QMP commands to cancel
> > and to query running jobs.
> 
> Sure, can easily go on top, just need to stuff the monitor_jobs into a
> list and allow ops on it.  Just want to make sure the direction I'm
> heading to is fine.
> 
> > Also, please move all this stuff to qmp.c
> > and do s/monitor/qmp rename.
> 
> Will do.
> 
> > Lastly, is it possible to have the block job QMP API on top of this
> > new QMP job API?
> 
> Don't think so.  As mentioned above this does short-running jobs as
> bottom half whereas block jobs are running in coroutines ...

Maybe we really should do a proper QMP jobs API.  Using a BH makes sense
for the screenshot case but is orthogonal to the QMP job API.

It may be possible to map block jobs onto the QMP jobs API.  Of course
the blockjob-specific QMP APIs will remain for compatibility.

Here's a quick overview of blockjob commands to give a feel for their
scope:

drive-mirror <args...>

Starts a block job and returns nothing.  Note that blockjobs do not have
ids because they are bound 1:1 with a block device.  This was a design
mistake, we should really allow for multiple jobs per block device.

query-block-jobs

Return info on active block jobs.

block-job-cancel

Mark a block job as cancelled.  It will cancel at the earliest
opportunity.

QMP Events BLOCK_JOB_COMPLETED and BLOCK_JOB_CANCELLED

Async events.

QMP Event BLOCK_JOB_ERROR

Error reporting with BlockDevOnError error handling policy information
(i.e. is the job paused waiting for the administrator to fix storage and
then continue it?).

Stefan

  reply	other threads:[~2013-06-18 14:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 14:01 [Qemu-devel] [RfC PATCH 0/2] new screendump qmp command Gerd Hoffmann
2013-06-17 14:01 ` [Qemu-devel] [RfC PATCH 1/2] display update with notification Gerd Hoffmann
2013-06-17 14:39   ` Anthony Liguori
2013-06-17 14:01 ` [Qemu-devel] [RfC PATCH 2/2] console: add screendump-device qmp cmd Gerd Hoffmann
2013-06-17 14:43   ` Anthony Liguori
2013-06-17 14:50     ` Luiz Capitulino
2013-06-18  9:24       ` Gerd Hoffmann
2013-06-18 13:13         ` Luiz Capitulino
2013-06-18 13:24           ` Gerd Hoffmann
2013-06-18 14:47             ` Stefan Hajnoczi [this message]
2013-06-25 10:28               ` Gerd Hoffmann
2013-07-12 17:01         ` Eric Blake
2013-07-12 17:06   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130618144713.GR7649@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=alevy@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).