From: Stefan Hajnoczi <stefanha@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block/vmdk: add basic .bdrv_check support
Date: Mon, 27 Jan 2014 16:37:25 +0100 [thread overview]
Message-ID: <20140127153725.GB23974@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1389612246-9545-1-git-send-email-pl@kamp.de>
On Mon, Jan 13, 2014 at 12:24:06PM +0100, Peter Lieven wrote:
> + for (;;) {
> + if (sector_num >= total_sectors) {
> + return 0;
> + }
> + extent = find_extent(s, sector_num, extent);
> + if (!extent) {
> + fprintf(stderr, "ERROR: could not find extend for sector %ld\n",
> + sector_num);
s/extend/extent/
Please use PRId64 instead of %ld so this works on 32-bit hosts.
> + break;
> + }
> + ret = get_cluster_offset(bs, extent, NULL, sector_num << BDRV_SECTOR_BITS,
> + 0, &cluster_offset);
> + if (ret == VMDK_ERROR) {
> + fprintf(stderr,
> + "ERROR: could not get cluster_offset for sector %ld\n",
PRId64
> + sector_num);
> + break;
> + }
> + if (ret == VMDK_OK && cluster_offset >= bdrv_getlength(extent->file)) {
> + fprintf(stderr,
> + "ERROR: cluster offset for sector %ld points after EOF\n",
PRId64
next prev parent reply other threads:[~2014-01-27 15:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1389612246-9545-1-git-send-email-pl@kamp.de>
2014-01-13 13:39 ` [Qemu-devel] [PATCH] block/vmdk: add basic .bdrv_check support Fam Zheng
2014-01-27 15:37 ` Stefan Hajnoczi [this message]
2014-01-27 18:30 ` Peter Lieven
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=20140127153725.GB23974@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
/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).