[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] Display logical disk size in 'info block' ou
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2] Display logical disk size in 'info block' output |
Date: |
Mon, 05 Sep 2011 14:44:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
Am 02.09.2011 18:38, schrieb Daniel P. Berrange:
> From: "Daniel P. Berrange" <address@hidden>
>
> To aid in knowing whether a 'block_resize' was succesful, display
> the logical disk size in bytes, in the 'info block' output
>
> In v2:
> - Replace sectors with bytes
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> block.c | 6 ++++--
> qmp-commands.hx | 1 +
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/block.c b/block.c
> index 03a21d8..03102ad 100644
> --- a/block.c
> +++ b/block.c
> @@ -1844,6 +1844,7 @@ static void bdrv_print_dict(QObject *obj, void *opaque)
>
> monitor_printf(mon, " file=");
> monitor_print_filename(mon, qdict_get_str(qdict, "file"));
> + monitor_printf(mon, " length=%" PRId64, qdict_get_int(qdict,
> "length"));
What about using get_human_readable_size() here? Or maybe we should
rather introduce an option that selects readable units or bytes for all
of the statistics? (The latter would be a separate patch, obviously)
Looks good to me otherwise, so if you don't like my suggestion I'll
merge it as it is.
Kevin