summaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-11-30 18:21:19 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 10:48:52 -0600
commit6ea44308b0e8156d352f07b97b2b05eaed89aa6d (patch)
treee73dd84e27eda107a8a798eaa8de08c5e85ddd2c /block.h
parenta55eb92c22a7be05bae0de6163bbe1e5f1d43ba3 (diff)
block migration: Rework constants API
Instead of duplicating the definition of constants or introducing trivial retrieval functions move the SECTOR constants into the public block API. This also obsoletes sector_per_block in BlkMigState. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/block.h b/block.h
index 85d231df6..351371227 100644
--- a/block.h
+++ b/block.h
@@ -41,6 +41,10 @@ typedef struct QEMUSnapshotInfo {
#define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB)
+#define BDRV_SECTOR_BITS 9
+#define BDRV_SECTOR_SIZE (1 << BDRV_SECTOR_BITS)
+#define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1);
+
void bdrv_info(Monitor *mon);
void bdrv_info_stats(Monitor *mon);
@@ -188,9 +192,10 @@ int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf,
int bdrv_load_vmstate(BlockDriverState *bs, uint8_t *buf,
int64_t pos, int size);
+#define BDRV_SECTORS_PER_DIRTY_CHUNK 8
+
void bdrv_set_dirty_tracking(BlockDriverState *bs, int enable);
int bdrv_get_dirty(BlockDriverState *bs, int64_t sector);
void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
int nr_sectors);
-int bdrv_get_sectors_per_chunk(void);
#endif