All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	"Denis V. Lunev" <den@openvz.org>,
	Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
	Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
	Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH] qemu-nbd: Add --all-bitmaps option
Date: Fri, 30 Oct 2026 12:01:13 +0100	[thread overview]
Message-ID: <auR4-ZcQRpwKkSbW@redhat.com> (raw)
In-Reply-To: <20261019222205.2028202-2-eblake@redhat.com>

Am 20.10.2026 um 00:22 hat Eric Blake geschrieben:
> When exporting bitmaps over NBD, we previously required a user to pass
> one '-B name' per bitmap, which they would have to use 'qemu-img info'
> to learn the list of names to pass.  More convenient is an option to
> export all possible bitmaps at once, as discussed here [1].
> 
> Implementation-wise, mixing --all-bitmaps and -B is harmless (grabbing
> all bitmap names already requires crawling the backing chain and
> deduplicating, so either the -B name is already detected as a
> duplicate from adding the name again, or it is an invalid name that
> will still cause a later error about bitmap not found). I also tested
> that mixing -s and --all-bitmaps still works (the temporary overlay
> image to make -s work has no bitmaps of its own, so starting the crawl
> for bitmap names at the original bs is just fine).
> 
> Also, now that parallels can have bitmaps (and not just qcow2), a
> slight doc wording change for -B is warranted.
> 
> [1] https://lists.nongnu.org/archive/html/qemu-devel/2026-10/msg01234.html
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>
> CC: Denis V. Lunev <den@openvz.org>

Thanks, applied to the block branch.

One thing I noticed is that you check for duplicates in the new
--all-bitmaps path, but in the existing -B path, nothing ever checks if
the user specified the same bitmap twice.

It seems to work fine even with adding the same bitmap twice, so I'm not
really sure if making things consistent would mean dropping the checks
for --all-bitmaps resulting in smaller code, or adding the check for -B
resulting in less surprising state. But I think there is room for a
cleanup patch on top of this.

Kevin



      parent reply	other threads:[~2026-10-30 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 22:22 [PATCH] qemu-nbd: Add --all-bitmaps option Eric Blake
2026-10-20 10:57 ` Denis V. Lunev
2026-10-30 11:01 ` Kevin Wolf [this message]

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=auR4-ZcQRpwKkSbW@redhat.com \
    --to=kwolf@redhat.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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.