[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Display sector count in 'info block' output
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH] Display sector count in 'info block' output |
Date: |
Fri, 2 Sep 2011 17:38:42 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Sep 02, 2011 at 04:37:24PM +0100, Stefan Hajnoczi wrote:
> 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.
Good points, I've sent a v2 using bytes instead of sectors.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|