From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Benoît Canet" <benoit.canet@nodalink.com>
Subject: Re: [Qemu-devel] [PATCH v3 0/3] block: Fix is_allocated() for truncated images
Date: Wed, 22 Oct 2014 17:20:40 +0200 [thread overview]
Message-ID: <20141022152040.GR3188@noname.str.redhat.com> (raw)
In-Reply-To: <1413990017-19213-1-git-send-email-mreitz@redhat.com>
Am 22.10.2014 um 17:00 hat Max Reitz geschrieben:
> Patch 2:
> The bdrv_is_allocated() functions may return a number of zero sectors
> e.g. if a sector beyond the image end has been queried. Respect this
> case in qemu-io's map implementation so it doesn't run into an infinite
> loop (https://bugs.launchpad.net/qemu/+bug/1356969).
>
> Patch 1:
> In that bug report, bdrv_co_get_block_status() fell through to the
> underlying file to get additional information (whether the sectors are
> zeroed). However, the offset reported by the image format (qcow2) was
> beyond the size of the underlying file and so this second query returned
> only zero clusters which replaced the actual number of sectors queried
> in the "formatted" (on qcow2 level) image. This replacement is generally
> fine because it allows bdrv_co_get_block_status() to follow the
> granularity (holes and non-holes) of the underlying file, but not if
> only zero clusters could be queried (which indicates a request beyond
> the image end).
> This patch makes bdrv_co_get_block_status() respect the underlying
> file's EOF and act accordingly.
>
> Patch 3 adds a test for patch 1; a test which depends on patch 2 is
> included in v3 of my series "raw-posix: Fix raw_co_get_block_status()".
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2014-10-22 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 15:00 [Qemu-devel] [PATCH v3 0/3] block: Fix is_allocated() for truncated images Max Reitz
2014-10-22 15:00 ` [Qemu-devel] [PATCH v3 1/3] block: Respect underlying file's EOF Max Reitz
2014-10-22 15:00 ` [Qemu-devel] [PATCH v3 2/3] qemu-io: Respect early image end for map Max Reitz
2014-10-22 15:00 ` [Qemu-devel] [PATCH v3 3/3] iotests: Add test for map commands Max Reitz
2014-10-22 15:20 ` Kevin Wolf [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=20141022152040.GR3188@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=benoit.canet@nodalink.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).