[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qcow2: Flush pending discards before allocating
Re: [Qemu-devel] [PATCH] qcow2: Flush pending discards before allocating cluster
Wed, 06 May 2015 15:31:35 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
On 06.05.2015 13:29, Kevin Wolf wrote:
Before a freed cluster can be reused, pending discards for this cluster
must be processed.
The original assumption was that this was not a problem because discards
are only cached during discard/write zeroes operations, which are
synchronous so that no concurrent write requests can cause cluster
However, the discard/write zeroes operation itself can allocate a new L2
table (and it has to in order to put zero flags there), so make sure we
can cope with the situation.
This fixes https://bugs.launchpad.net/bugs/1349972.
Signed-off-by: Kevin Wolf <address@hidden>
block/qcow2-refcount.c | 5 +++++
1 file changed, 5 insertions(+)
Reviewed-by: Max Reitz <address@hidden>