From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52853 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPd6f-0007rD-Av for qemu-devel@nongnu.org; Fri, 18 Jun 2010 11:03:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPd6d-0007LK-Hv for qemu-devel@nongnu.org; Fri, 18 Jun 2010 11:03:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30057) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPd6d-0007L6-BH for qemu-devel@nongnu.org; Fri, 18 Jun 2010 11:03:43 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5IF3f3e019723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 Jun 2010 11:03:41 -0400 From: Kevin Wolf Date: Fri, 18 Jun 2010 17:03:23 +0200 Message-Id: <1276873409-8235-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 0/6] block: Add flush after metadata writes 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 This addresses the data integrity problems which are described for qcow at http://wiki.qemu.org/Features/Qcow2DataIntegrity#Metadata_update_ordering.2C_Part_2 These problems are the same for all writable image formats, so this series contains a patch for each of them. The only exception is VDI which uses AIO for writing its metadata. It needs a different fix. Kevin Wolf (6): block: Add bdrv_(p)write_sync cow: Use bdrv_(p)write_sync for metadata writes qcow: Use bdrv_(p)write_sync for metadata writes qcow2: Use bdrv_(p)write_sync for metadata writes vmdk: Use bdrv_(p)write_sync for metadata writes vpc: Use bdrv_(p)write_sync for metadata writes block.c | 37 +++++++++++++++++++++++++++++++++++++ block.h | 4 ++++ block/cow.c | 20 +++++++++++--------- block/qcow.c | 18 ++++++++++-------- block/qcow2-cluster.c | 24 ++++++++++++------------ block/qcow2-refcount.c | 24 ++++++++++++------------ block/qcow2-snapshot.c | 23 +++++++++++------------ block/qcow2.c | 10 +++++----- block/vmdk.c | 10 +++++----- block/vpc.c | 9 +++++---- 10 files changed, 112 insertions(+), 67 deletions(-)