From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7F5s-0002IE-Sk for qemu-devel@nongnu.org; Wed, 07 Aug 2013 21:32:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7F5l-0006Zf-9T for qemu-devel@nongnu.org; Wed, 07 Aug 2013 21:32:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7F5k-0006ZU-VJ for qemu-devel@nongnu.org; Wed, 07 Aug 2013 21:32:41 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r781WeJx003432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 7 Aug 2013 21:32:40 -0400 From: Jeff Cody Date: Wed, 7 Aug 2013 21:32:28 -0400 Message-Id: Subject: [Qemu-devel] [PATCH v3 0/9] VHDX log replay and write support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com This patch series contains the initial VHDX log parsing, replay, and write support. === v3 changes === Thank you Kevin & Stefan for the feedback; incoporated in v3: Patch 1: --- nil --- Patch 2: * use sizeof(crc) instead of 4 * remove outdated comment * use sizeof(MSGUID) instead of 16 * direct assignment of guid structs rather than memcpy * rename 'rw' to 'generate_data_write_guid' * use offsetof() instead of 4 * comment typos * add missing error checking * MSGUID is now QEMU_PACKED * configure enable for vhdx is now correct and not braindead Patch 3: --- nil --- Patch 4: * code style fixes * removed unused struct (VHDXLogEntryInfo) Patch 5: * more direct assignment of guid rather than memcpy * order of operation in export/import the same now * became less generous with newlines (bah-humbug!) Patch 6: * more direct assignment of guid rather than memcpy * add error check in vhdx_user_visible_write(), now returns int Patch 7: * check error return now of vhdx_user_visible_write() Patch 8: * check error return now of vhdx_user_visible_write() * vhdx_log_write_sectors() uses bdrv_pwrite() vs bdrv_pwrite_sync() * more direct assignment of guid rather than memcpy * use offsetof() instead of 4 Patch 9: --- nil --- === end v3 changelog === v2 changes: Incorporated Fam's review feedback - Thank you Fam for the feedback === end v2 changelog === This will allow an existing log in a VHDX image to be replayed (e.g., a VHDX image from a Hyper-V host that crashed). In addition, metadata writes are enabled through the log. This allows write support to be enabled for VHDX, as the BAT can be updated safely via the log journal. These exact patches are available from github, for testing: https://github.com/codyprime/qemu-kvm-jtc/tree/vhdx-write-v2-upstream The latest vhdx work (including anything beyond these patches, such as backing/parent file support) can be found at: https://github.com/codyprime/qemu-kvm-jtc/tree/jtc-vhdx-latest Jeff Cody (9): block: vhdx - minor comments and typo correction. block: vhdx - add header update capability. block: vhdx code movement - VHDXMetadataEntries and BDRVVHDXState to header. block: vhdx - log support struct and defines block: vhdx - break endian translation functions out block: vhdx - update log guid in header, and first write tracker block: vhdx - log parsing, replay, and flush support block: vhdx - add log write support block: vhdx write support block/Makefile.objs | 2 +- block/vhdx-endian.c | 141 +++++++ block/vhdx-log.c | 1011 +++++++++++++++++++++++++++++++++++++++++++++++++++ block/vhdx.c | 399 ++++++++++++++------ block/vhdx.h | 135 +++++-- configure | 24 ++ 6 files changed, 1585 insertions(+), 127 deletions(-) create mode 100644 block/vhdx-endian.c create mode 100644 block/vhdx-log.c -- 1.8.1.4