qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 0/3] block: Fix is_allocated() for truncated


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v3 0/3] block: Fix is_allocated() for truncated images
Date: Wed, 22 Oct 2014 17:20:40 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]