From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUXH1-0002AI-Im for qemu-devel@nongnu.org; Fri, 11 Oct 2013 03:36:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUXGu-0004ID-Vd for qemu-devel@nongnu.org; Fri, 11 Oct 2013 03:36:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUXGu-0004I7-Op for qemu-devel@nongnu.org; Fri, 11 Oct 2013 03:36:28 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9B7aRgq017360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Oct 2013 03:36:28 -0400 From: Max Reitz Date: Fri, 11 Oct 2013 09:36:24 +0200 Message-Id: <1381476986-3032-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/2] qcow2: Undo leaked allocations in co_writev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz If a write request on a qcow2 image spans more than one L2 table, qcow2_alloc_cluster_offset cannot allocate the required clusters in a single operation. This results in leaks, if a subsequent (atomic) allocation in that function fails, because qcow2_co_writev does not undo unused cluster allocations. This series implements that deallocation and provides a test for it. v2: - patch 1: added a comment about the significance of future changes at a certain point in qcow2_co_writev - patch 1: changed QCOW2_DISCARD_ALWAYS to QCOW2_DISCARD_OTHER Max Reitz (2): qcow2: Undo leaked allocations in co_writev qemu-iotests: Extend test 026 block/qcow2.c | 15 +++++++++++++++ tests/qemu-iotests/026 | 31 +++++++++++++++++++++++++++++++ tests/qemu-iotests/026.out | 8 ++++++++ tests/qemu-iotests/026.out.nocache | 8 ++++++++ 4 files changed, 62 insertions(+) -- 1.8.3.1