summaryrefslogtreecommitdiff
path: root/block/vhdx.h
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2013-10-30 10:44:43 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2013-11-07 13:58:58 +0100
commitc3906c5e8281b37a526c706596af8575d6ac00d3 (patch)
tree609b75718f7b1bd5a63bf99e2e9330420144603f /block/vhdx.h
parent0f48e8f0978afe0bd44c63749e7df6411da6c437 (diff)
downloadqemu-c3906c5e8281b37a526c706596af8575d6ac00d3.tar.gz
block: vhdx - update log guid in header, and first write tracker
Allow tracking of first file write in the VHDX image, as well as the ability to update the GUID in the header. This is in preparation for log support. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/vhdx.h')
-rw-r--r--block/vhdx.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/vhdx.h b/block/vhdx.h
index 23028af04b..6c35737b07 100644
--- a/block/vhdx.h
+++ b/block/vhdx.h
@@ -361,6 +361,7 @@ typedef struct BDRVVHDXState {
VHDXBatEntry *bat;
uint64_t bat_offset;
+ bool first_visible_write;
MSGUID session_guid;
VHDXLogEntries log;
@@ -373,6 +374,9 @@ typedef struct BDRVVHDXState {
void vhdx_guid_generate(MSGUID *guid);
+int vhdx_update_headers(BlockDriverState *bs, BDRVVHDXState *s, bool rw,
+ MSGUID *log_guid);
+
uint32_t vhdx_update_checksum(uint8_t *buf, size_t size, int crc_offset);
uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size,
int crc_offset);
@@ -402,4 +406,6 @@ void vhdx_log_data_le_export(VHDXLogDataSector *d);
void vhdx_log_entry_hdr_le_import(VHDXLogEntryHeader *hdr);
void vhdx_log_entry_hdr_le_export(VHDXLogEntryHeader *hdr);
+int vhdx_user_visible_write(BlockDriverState *bs, BDRVVHDXState *s);
+
#endif