aboutsummaryrefslogtreecommitdiff
path: root/block_int.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-05 19:10:55 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-05 19:10:55 +0000
commit178e08a58f40dd5aef2ce774fe0850f5d0e56918 (patch)
tree4884054a59eaaad4b5df2f47403cee9a81e8e2db /block_int.h
parent8185d2c9a20975114ebb59b0f46b615cbb83c730 (diff)
Fix savevm after BDRV_FILE size enforcement
We now enforce that you cannot write beyond the end of a non-growable file. qcow2 files are not growable but we rely on them being growable to do savevm/loadvm. Temporarily allow them to be growable by introducing a new API specifically for savevm read/write operations. Reported-by: malc Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6994 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h
index af6dff6bd6..dc4335982c 100644
--- a/block_int.h
+++ b/block_int.h
@@ -78,6 +78,11 @@ struct BlockDriver {
QEMUSnapshotInfo **psn_info);
int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi);
+ int (*bdrv_put_buffer)(BlockDriverState *bs, const uint8_t *buf,
+ int64_t pos, int size);
+ int (*bdrv_get_buffer)(BlockDriverState *bs, uint8_t *buf,
+ int64_t pos, int size);
+
/* removable device specific */
int (*bdrv_is_inserted)(BlockDriverState *bs);
int (*bdrv_media_changed)(BlockDriverState *bs);