aboutsummaryrefslogtreecommitdiff
path: root/vl.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-07-06 17:15:21 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-07-06 17:15:21 +0000
commit33e3963e1b9298e01cadd738124f0e618b5b79f5 (patch)
tree644d51090f8792ccd3cb6568e1673affaa4a3831 /vl.h
parentcd4c3e888a385acbb27532745102b95796185777 (diff)
added user mode Linux Copy On Write disk image support - added -snapshot support (initial patch by Rusty Russell)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@309 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.h')
-rw-r--r--vl.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/vl.h b/vl.h
index 87b569d0f6..fa7d5da274 100644
--- a/vl.h
+++ b/vl.h
@@ -24,16 +24,32 @@
#ifndef VL_H
#define VL_H
+/* vl.c */
+void *get_mmap_addr(unsigned long size);
+
/* block.c */
typedef struct BlockDriverState BlockDriverState;
-BlockDriverState *bdrv_open(const char *filename);
+BlockDriverState *bdrv_open(const char *filename, int snapshot);
void bdrv_close(BlockDriverState *bs);
int bdrv_read(BlockDriverState *bs, int64_t sector_num,
uint8_t *buf, int nb_sectors);
int bdrv_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors);
void bdrv_get_geometry(BlockDriverState *bs, int64_t *nb_sectors_ptr);
+int bdrv_commit(BlockDriverState *bs);
+
+/* user mode linux compatible COW file */
+#define COW_MAGIC 0x4f4f4f4d /* MOOO */
+#define COW_VERSION 2
+struct cow_header_v2 {
+ uint32_t magic;
+ uint32_t long version;
+ char backing_file[1024];
+ int32_t mtime;
+ uint64_t size;
+ uint32_t sectorsize;
+};
#endif /* VL_H */