qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Display sector count in 'info block' output


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] Display sector count in 'info block' output
Date: Fri, 2 Sep 2011 16:37:24 +0100

On Fri, Sep 2, 2011 at 4:01 PM, Daniel P. Berrange <address@hidden> wrote:
> From: "Daniel P. Berrange" <address@hidden>
>
> To aid in knowing whether a 'block_resize' was succesful, display
> the sector count in the 'info block' output
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  block.c         |    6 ++++--
>  qmp-commands.hx |    1 +
>  2 files changed, 5 insertions(+), 2 deletions(-)

Please use bdrv_getlength().  That way units are in bytes, not
"sectors" (could be confusing, e.g. on 4 KB devices).  Also for
"growable" block devices we actually query instead of reading the
cached total_sectors field.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]