All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v2 2/6] blockdev: Split off basic bitmap operations for qemu-img
Date: Fri, 8 May 2020 13:37:53 +0200	[thread overview]
Message-ID: <20200508113753.GC4970@linux.fritz.box> (raw)
In-Reply-To: <a16c3c4d-272b-6c5f-9d67-2a222c8f1f88@redhat.com>

Am 30.04.2020 um 16:50 hat Eric Blake geschrieben:
> On 4/30/20 8:59 AM, Max Reitz wrote:
> > On 21.04.20 23:20, Eric Blake wrote:
> > > Upcoming patches want to add some basic bitmap manipulation abilities
> > > to qemu-img.  But blockdev.o is too heavyweight to link into qemu-img
> > > (among other things, it would drag in block jobs and transaction
> > > support - qemu-img does offline manipulation, where atomicity is less
> > > important because there are no concurrent modifications to compete
> > > with), so it's time to split off the bare bones of what we will need
> > > into a new file blockbitmaps.o.
> > > 
> > > In addition to exposing 6 QMP commands for use by qemu-img (add,
> > > remove, clear, enable, disable, merge), this also has to export three
> > > previously-static functions for use by blockdev.c transactions.
> > > 
> > > Signed-off-by: Eric Blake <eblake@redhat.com>
> > > ---
> > >   Makefile.objs             |   2 +-
> > >   include/sysemu/blockdev.h |  14 ++
> > >   blockbitmaps.c            | 324 ++++++++++++++++++++++++++++++++++++++
> > 
> > Hm.  Can we get a better name?  blockdev-bitmaps.c, for example?
> 
> Sure, I'm open to bike-shed suggestions.  I'd also _really_ love to make the
> new file NOT live in the top-level, but that's a harder task that I'm not
> sure how to do (it's easy to tweak Makefile.objs for another file in the
> same directory, but harder to see through the magic to figure out how to
> relocate things).

Yes, please move it somewhere else. I'd suggest something like
block/monitor/bitmap-qmp-cmds.c for the QMP command handlers, and if
there are functions that are more generally useful, block/bitmaps.c.

Instead of modifying the top-level Makefile.objs, you would just edit
block/monitor/Makefile.objs instead and add the filename there. I don't
think you need to understand any magic apart from knowing that is exists
and does what you would expect.

Kevin



  reply	other threads:[~2020-05-08 11:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 21:20 [PATCH v2 0/6] qemu-img: Add convert --bitmaps Eric Blake
2020-04-21 21:20 ` [PATCH v2 1/6] docs: Sort sections on qemu-img subcommand parameters Eric Blake
2020-04-30 12:50   ` Max Reitz
2020-04-21 21:20 ` [PATCH v2 2/6] blockdev: Split off basic bitmap operations for qemu-img Eric Blake
2020-04-30 13:59   ` Max Reitz
2020-04-30 14:50     ` Eric Blake
2020-05-08 11:37       ` Kevin Wolf [this message]
2020-05-08 13:48         ` Eric Blake
2020-04-21 21:20 ` [PATCH v2 3/6] qemu-img: Add bitmap sub-command Eric Blake
2020-04-30 14:55   ` Max Reitz
2020-04-30 15:21     ` Eric Blake
2020-05-04 10:01       ` Max Reitz
2020-05-04 13:28         ` Eric Blake
2020-04-21 21:20 ` [PATCH v2 4/6] qcow2: Expose bitmaps' size during measure Eric Blake
2020-05-04 11:36   ` Max Reitz
2020-05-04 13:44     ` Eric Blake
2020-04-21 21:20 ` [PATCH v2 5/6] qemu-img: Add convert --bitmaps option Eric Blake
2020-05-04 12:14   ` Max Reitz
2020-04-21 21:20 ` [PATCH v2 6/6] iotests: Add test 291 to for qemu-img bitmap coverage Eric Blake
2020-05-04 13:05   ` Max Reitz
2020-05-05 21:22     ` Eric Blake
2020-04-21 22:22 ` [PATCH v2 0/6] qemu-img: Add convert --bitmaps no-reply
2020-04-21 22:49   ` [PATCH] fixup! qemu-img: Add bitmap sub-command 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=20200508113753.GC4970@linux.fritz.box \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.