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 <[email protected]>
> ---
>  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".

But overall, I like the idea of being able to display what used to be
internal information.

Reviewed-by: Eric Blake <[email protected]>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org


Reply via email to