From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSubo-0004lM-0y for qemu-devel@nongnu.org; Fri, 11 May 2012 14:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSubm-0005ZT-32 for qemu-devel@nongnu.org; Fri, 11 May 2012 14:30:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSubl-0005Z7-Q3 for qemu-devel@nongnu.org; Fri, 11 May 2012 14:30:29 -0400 From: Kevin Wolf Date: Fri, 11 May 2012 18:48:48 +0200 Message-Id: <1336754931-20058-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH block-next 0/3] qemu-img check/qcow2: Allow fixing refcounts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@gmail.com A prerequisite for a "QED mode" in qcow2, which doesn't update the refcount table except on clean shutdown, is that refcounts can be repaired when the image is opened the next time after a crash. This series adds a qemu-img check option that doesn't only check, but also tries to fix the errors that it found. Kevin Wolf (3): qemu-img check -r for repairing images qemu-img check: Print fixed clusters and recheck qcow2: Support for fixing refcount inconsistencies block.c | 4 ++-- block.h | 9 ++++++++- block/qcow2-refcount.c | 27 +++++++++++++++++++++++++-- block/qcow2.c | 5 +++-- block/qcow2.h | 3 ++- block/qed-check.c | 2 ++ block/qed.c | 5 +++-- block/vdi.c | 7 ++++++- block_int.h | 3 ++- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 35 ++++++++++++++++++++++++++++++++--- qemu-img.texi | 7 ++++++- 12 files changed, 93 insertions(+), 18 deletions(-) -- 1.7.6.5