From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqfwL-0007Hw-Ca for qemu-devel@nongnu.org; Fri, 08 May 2015 06:55:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqfwH-0004Wi-IM for qemu-devel@nongnu.org; Fri, 08 May 2015 06:55:33 -0400 Date: Fri, 8 May 2015 12:55:20 +0200 From: Kevin Wolf Message-ID: <20150508105520.GH4318@noname.redhat.com> References: <1430911774-19006-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430911774-19006-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qcow2: Flush pending discards before allocating cluster List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: qemu-stable@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com Am 06.05.2015 um 13:29 hat Kevin Wolf geschrieben: > 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 > allocations. > > 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 Cc: qemu-stable@nongnu.org Applied to my block branch. Kevin