qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 3/6] add backup related monitor commands
Date: Wed, 12 Dec 2012 10:47:43 -0700	[thread overview]
Message-ID: <50C8C33F.1050304@redhat.com> (raw)
In-Reply-To: <1354267354-1028712-3-git-send-email-dietmar@proxmox.com>

[-- Attachment #1: Type: text/plain, Size: 3821 bytes --]

On 11/30/2012 02:22 AM, Dietmar Maurer wrote:
> We use a generic BackupDriver struct to encaplulated all archive format

s/encaplulated/encapsulated/

> related function.
> 
> Another option would be to simply dump <devid,cluster_num,cluster_data> to
> the output fh (pipe), and an external binary saves the data. That way we
> could move the whole archive format related code out of qemu.

I'm coming into this review late, so I'm not sure what your series is
adding that cannot already be done with external snapshots and migration
to file.  But any time someone proposes new QMP commands that libvirt
might have to interact with, I try to chime in:

> 
> Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
> ---
>  backup.h         |   14 +++
>  blockdev.c       |  337 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  hmp-commands.hx  |   31 +++++
>  hmp.c            |   63 ++++++++++
>  hmp.h            |    3 +
>  monitor.c        |    7 +
>  qapi-schema.json |   81 +++++++++++++
>  qmp-commands.hx  |   27 +++++
>  8 files changed, 563 insertions(+), 0 deletions(-)
> 

> +++ b/qapi-schema.json
> @@ -358,6 +358,39 @@
>  { 'type': 'EventInfo', 'data': {'name': 'str'} }
>  
>  ##
> +# @BackupStatus:
> +#
> +# Detailed backup status.
> +#
> +# @status: #optional string describing the current backup status.
> +#          Tthis can be 'active', 'done', 'error'. If this field is not

s/Tthis/This/

> +#          returned, no backup process has been initiated
> +#
> +# @errmsg: #optional error message (only returned if status is 'error')
> +#
> +# @total: #optional total amount of bytes involved in the backup process
> +#
> +# @transferred: #optional amount of bytes already backed up.
> +#
> +# @zero-bytes: #optional amount of 'zero' bytes detected.
> +#
> +# @start-time: #optional time (epoch) when backup job started.

Should you account for sub-second resolution here

> +#
> +# @end-time: #optional time (epoch) when backup job finished.

and here?

> +#
> +# @backupfile: #optional backup file name
> +#
> +# @uuid: #optional uuid for this backup job
> +#
> +# Since: 1.4.0
> +##
> +{ 'type': 'BackupStatus',
> +  'data': {'*status': 'str', '*errmsg': 'str', '*total': 'int',
> +           '*transferred': 'int', '*zero-bytes': 'int',
> +           '*start-time': 'int', '*end-time': 'int',
> +           '*backupfile': 'str', '*uuid': 'str' } }
> +
> +##
>  # @query-events:
>  #
>  # Return a list of supported QMP events by this server
> @@ -1764,6 +1797,54 @@
>    'data': { 'path': 'str' },
>    'returns': [ 'ObjectPropertyInfo' ] }
>  
> +
> +##
> +# @backup:
> +#
> +# Starts a VM backup.
> +#
> +# @backupfile: the backup file name

I guess the fdset mechanism is how libvirt would pass in a pipe fd
rather than supplying an actual file name.  Does your implementation
allow for pipes, or must it be seekable?

> +#
> +# @format: format of the backup file

Rather than letting this be a free-form string, it would be nicer as an
enum of actually supported formats.

> +#
> +# @config-filename: #optional name of a configuration file to include into
> +# the backup archive.
> +#
> +# @speed: #optional the maximum speed, in bytes per second
> +#
> +# Returns: the uuid of the backup job

UUID in raw byte format, or in ASCII format?  (Assuming the latter)

> +#
> +# Since: 1.4.0
> +##
> +{ 'command': 'backup', 'data': { 'backupfile': 'str', '*format': 'str',

backupfile sounds like a run-on; is it any better to name it backup-file?

> +                                 '*config-filename': 'str',

especially when compared with config-filename

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2012-12-12 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  9:22 [Qemu-devel] [PATCH v2 1/6] RFC: Efficient VM backup for qemu Dietmar Maurer
2012-11-30  9:22 ` [Qemu-devel] [PATCH v2 2/6] add basic backup support to block driver Dietmar Maurer
2012-11-30  9:22 ` [Qemu-devel] [PATCH v2 3/6] add backup related monitor commands Dietmar Maurer
2012-12-12 17:47   ` Eric Blake [this message]
2012-12-12 19:33     ` Dietmar Maurer
2012-11-30  9:22 ` [Qemu-devel] [PATCH v2 4/6] introduce new vma archive format Dietmar Maurer
2012-11-30  9:22 ` [Qemu-devel] [PATCH v2 5/6] add regression tests for backup Dietmar Maurer
2012-11-30  9:22 ` [Qemu-devel] [PATCH v2 6/6] add vm state to backups Dietmar Maurer
2012-12-03 10:13   ` Wenchao Xia

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=50C8C33F.1050304@redhat.com \
    --to=eblake@redhat.com \
    --cc=dietmar@proxmox.com \
    --cc=qemu-devel@nongnu.org \
    /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).