From: "Daniel P. Berrange" <dan@berrange.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Display sector count in 'info block' output
Date: Fri, 2 Sep 2011 17:38:42 +0100 [thread overview]
Message-ID: <20110902163842.GA13413@berrange.com> (raw)
In-Reply-To: <CAJSP0QUiOdXk+qWUckKaFk-KUJ-xtefMys1W=hxC-P4xYo-3LA@mail.gmail.com>
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 <dan@berrange.com> wrote:
> > From: "Daniel P. Berrange" <dan@berrange.com>
> >
> > 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 <dan@berrange.com>
> > ---
> > 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 :|
prev parent reply other threads:[~2011-09-02 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 15:01 [Qemu-devel] [PATCH] Display sector count in 'info block' output Daniel P. Berrange
2011-09-02 15:37 ` Stefan Hajnoczi
2011-09-02 16:38 ` Daniel P. Berrange [this message]
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=20110902163842.GA13413@berrange.com \
--to=dan@berrange.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).