From: Fam Zheng <famz@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] Is the use of bdrv_getlength() in vmdk_check() kosher?
Date: Fri, 4 Aug 2017 21:55:37 +0800 [thread overview]
Message-ID: <20170804135537.GB14780@lemon> (raw)
In-Reply-To: <87o9rvfonm.fsf@dusky.pond.sub.org>
On Fri, 08/04 15:28, Markus Armbruster wrote:
> Have a look at vmdk_check():
>
> if (ret == VMDK_OK &&
> cluster_offset >= bdrv_getlength(extent->file->bs))
>
> bdrv_getlength() can fail. Does it do the right thing then? For what
> it's worth, the comparison of its value is unsigned.
Sure, error handling should be done with bdrv_getlength() return value. I'll
send a patch.
Fam
prev parent reply other threads:[~2017-08-04 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 13:28 [Qemu-devel] Is the use of bdrv_getlength() in vmdk_check() kosher? Markus Armbruster
2017-08-04 13:55 ` Fam Zheng [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=20170804135537.GB14780@lemon \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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).