diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2009-11-30 18:21:19 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 10:48:52 -0600 |
commit | 6ea44308b0e8156d352f07b97b2b05eaed89aa6d (patch) | |
tree | e73dd84e27eda107a8a798eaa8de08c5e85ddd2c /block.h | |
parent | a55eb92c22a7be05bae0de6163bbe1e5f1d43ba3 (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.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |