From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-block@nongnu.org, hreitz@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] qemu-img info: Optionally show block limits
Date: Wed, 24 Sep 2025 10:28:45 +0200 [thread overview]
Message-ID: <aNOrvWSQMlNMH6q3@redhat.com> (raw)
In-Reply-To: <xsupfh7ch565s7tmiq5r4u7zwc2nui7grdrt4dliqodaujvn5z@d3u7as7xqwhx>
Am 23.09.2025 um 20:09 hat Eric Blake geschrieben:
> On Tue, Sep 23, 2025 at 06:37:35PM +0200, Kevin Wolf wrote:
> > Add a new --limits option to 'qemu-img info' that displays the block
> > limits for the image and all of its children, making the information
> > more accessible for human users than in QMP. This option is not enabled
> > by default because it can be a lot of output that isn't usually relevant
> > if you're not specifically trying to diagnose some I/O problem.
> >
> > This makes the same information automatically also available in HMP
> > 'info block -v'.
> >
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> > docs/tools/qemu-img.rst | 6 +++++-
> > include/block/qapi.h | 2 +-
> > block/qapi.c | 34 ++++++++++++++++++++++++++++++++--
> > qemu-img.c | 15 ++++++++++++---
> > qemu-img-cmds.hx | 4 ++--
> > 5 files changed, 52 insertions(+), 9 deletions(-)
> >
>
> > +++ b/qemu-img.c
>
> > @@ -3119,6 +3123,8 @@ static int img_info(const img_cmd_t *ccmd, int argc, char **argv)
> > " display information about the backing chain for copy-on-write overlays\n"
> > " -U, --force-share\n"
> > " open image in shared mode for concurrent access\n"
> > +" --limits\n"
> > +" show detected block limits (may depend on options, e.g. cache mode)\n"
>
> I'm trying to figure out how the parenthetical helps the --help
> message. The fact that it is detected limits already implies that
> anything else (like cache mode) that can change what gets detected
> would have an impact. So I think it would be fine to just use " show
> detected block limits\n".
Yes, other options can influence the limits, too. I just thought that
the most common pitfall for users will be that they actually want to
know the limits for cache=none because that's what their VM uses, but
'qemu-img info' returns them for cache=writeback. So it felt helpful to
add the note. But if you think that we'd better leave it out, I can
remove it.
Actually, this reminds me that I wanted to add a -t <cache_mode> option
to 'qemu-img info', too, so that you can actually get the interesting
information without using --image-opts. That will be something for a
separate patch, though.
Kevin
next prev parent reply other threads:[~2025-09-24 8:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 16:37 [PATCH 0/2] block: Expose block limits in monitor and qemu-img info Kevin Wolf
2025-09-23 16:37 ` [PATCH 1/2] block: Expose block limits for images in QMP Kevin Wolf
2025-09-23 18:03 ` Eric Blake
2025-09-24 6:10 ` Markus Armbruster
2025-09-24 9:05 ` Kevin Wolf
2025-09-24 10:43 ` Markus Armbruster
2025-09-23 16:37 ` [PATCH 2/2] qemu-img info: Optionally show block limits Kevin Wolf
2025-09-23 18:09 ` Eric Blake
2025-09-24 8:28 ` Kevin Wolf [this message]
2025-09-29 14:02 ` [PATCH 0/2] block: Expose block limits in monitor and qemu-img info Hanna Czenczek
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=aNOrvWSQMlNMH6q3@redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@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.