qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org
Cc: kwolf@redhat.com, nsoffer@redhat.com, qemu-block@nongnu.org,
	mreitz@redhat.com
Subject: Re: [PATCH v4 6/9] qemu-img: Add bitmap sub-command
Date: Thu, 14 May 2020 09:20:24 -0500	[thread overview]
Message-ID: <0542a587-424c-a596-1778-e7aaf494298c@redhat.com> (raw)
In-Reply-To: <ef44c5c0-1032-76e3-a3ce-ad0cc43d297c@virtuozzo.com>

On 5/14/20 1:45 AM, Vladimir Sementsov-Ogievskiy wrote:
> 13.05.2020 04:16, Eric Blake wrote:
>> Include actions for --add, --remove, --clear, --enable, --disable, and
>> --merge (note that --clear is a bit of fluff, because the same can be
>> accomplished by removing a bitmap and then adding a new one in its
>> place, but it matches what QMP commands exist).  Listing is omitted,
>> because it does not require a bitmap name and because it was already
>> possible with 'qemu-img info'.  A single command line can play one or
>> more bitmap commands in sequence on the same bitmap name (although all
>> added bitmaps share the same granularity, and and all merged bitmaps
>> come from the same source file).  Merge defaults to other bitmaps in
>> the primary image, but can also be told to merge bitmaps from a
>> distinct image.
>>

> 
> I'm sorry for asking it only now on v4.. But still. Why do we need it? 

Ease of use.

> We can instead run qemu binary (or even new qemu-storage-daemon) and 
> just use existing qmp commands. Is there a real benefit in developing 
> qemu-img, maintaining two interfaces for the same thing?

If it makes someone's life easier, and is not hard to maintain, then 
yes.  A command line interface that calls into QMP is not hard to 
maintain.  And _I_ certainly found it easier to write iotests with this 
patch in place, so it already has at least one client.

> Of-course, just 
> run qmp commands from terminal is a lot less comfortable than just a 
> qemu img command.. But may be we need some wrapper, which make it simple 
> to run one qmp command on an image?
> 
> It's simple to make a python wrapper working like
> 
> qemu-qmp block-dirty-bitmap-add '{node: self, name: bitmap0, persistent: 
> true}' /path/to/x.qcow2

This _IS_ such a wrapper.  The whole point of this patch is that it is 
now simpler to run one (or more) QMP command on an offline image from 
the command line.  Just because I wrote it in C instead of python, and 
attached it to an existing tool instead of writing a new tool, doesn't 
change the fact that it is just a wrapper around the existing QMP commands.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-05-14 14:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  1:16 [PATCH v4 0/9] qemu-img: Add convert --bitmaps Eric Blake
2020-05-13  1:16 ` [PATCH v4 1/9] docs: Sort sections on qemu-img subcommand parameters Eric Blake
2020-05-14  5:02   ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 2/9] qemu-img: Fix stale comments on doc location Eric Blake
2020-05-14  5:06   ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 3/9] block: Make it easier to learn which BDS support bitmaps Eric Blake
2020-05-14  5:19   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:09     ` Eric Blake
2020-05-13  1:16 ` [PATCH v4 4/9] blockdev: Promote several bitmap functions to non-static Eric Blake
2020-05-14  5:45   ` Vladimir Sementsov-Ogievskiy
2020-05-14 11:45   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:10     ` Eric Blake
2020-05-13  1:16 ` [PATCH v4 5/9] blockdev: Split off basic bitmap operations for qemu-img Eric Blake
2020-05-14  6:21   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:15     ` Eric Blake
2020-05-13  1:16 ` [PATCH v4 6/9] qemu-img: Add bitmap sub-command Eric Blake
2020-05-14  6:45   ` Vladimir Sementsov-Ogievskiy
2020-05-14 14:20     ` Eric Blake [this message]
2020-05-14 15:09       ` Vladimir Sementsov-Ogievskiy
2020-05-18 11:42   ` Vladimir Sementsov-Ogievskiy
2020-05-18 19:07     ` Eric Blake
2020-05-18 19:38       ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 7/9] qcow2: Expose bitmaps' size during measure Eric Blake
2020-05-18 13:07   ` Vladimir Sementsov-Ogievskiy
2020-05-18 19:17     ` Eric Blake
2020-05-18 19:47       ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 8/9] qemu-img: Add convert --bitmaps option Eric Blake
2020-05-18 13:33   ` Vladimir Sementsov-Ogievskiy
2020-05-13  1:16 ` [PATCH v4 9/9] iotests: Add test 291 to for qemu-img bitmap coverage Eric Blake
2020-05-18 14:43   ` Vladimir Sementsov-Ogievskiy

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=0542a587-424c-a596-1778-e7aaf494298c@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nsoffer@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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).