From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nh3gV-0007Ln-R4 for qemu-devel@nongnu.org; Mon, 15 Feb 2010 11:20:31 -0500 Received: from [199.232.76.173] (port=33670 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh3gU-0007LS-Nj for qemu-devel@nongnu.org; Mon, 15 Feb 2010 11:20:30 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nh3gT-0004b8-It for qemu-devel@nongnu.org; Mon, 15 Feb 2010 11:20:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:19351) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nh3gT-0004b4-5s for qemu-devel@nongnu.org; Mon, 15 Feb 2010 11:20:29 -0500 From: Kevin Wolf Date: Mon, 15 Feb 2010 17:19:26 +0100 Message-Id: <1266250769-5816-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] qcow2: Rewrite alloc_refcount_block List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, hch@lst.de, armbru@redhat.com, gleb@redhat.com, quintela@redhat.com The current implementation of alloc_refcount_block and grow_refcount_table has fundamental problems regarding error handling. There are some places where an I/O error means that the image is going to be corrupted. I have found that the only way to fix this is to completely rewrite the thing. Just sending as an RFC to the list hasn't generated a lot of comments (to be precise, not a single one). This is a critical part of qcow2 and needs reviews. So let's try it another way: People in CC, please give it a review. Sooner or later some of you will need to do so anyway. Kevin Wolf (3): qcow2: Factor next_refcount_table_size out qcow2: Rewrite alloc_refcount_block/grow_refcount_table qcow2: More check for qemu-img check block/qcow2-refcount.c | 334 +++++++++++++++++++++++++++++++++++------------- 1 files changed, 244 insertions(+), 90 deletions(-)