block: add bdrv_set_dirty()/bdrv_reset_dirty() to block_int.h
The dirty bitmap functions are called from the block I/O processing code. Make them visible to block_int.h users so they can be used outside block.c. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
4f5472cb2d
commit
e0c47b6cb1
8
block.c
8
block.c
|
@ -110,10 +110,6 @@ static QTAILQ_HEAD(, BlockDriverState) graph_bdrv_states =
|
||||||
static QLIST_HEAD(, BlockDriver) bdrv_drivers =
|
static QLIST_HEAD(, BlockDriver) bdrv_drivers =
|
||||||
QLIST_HEAD_INITIALIZER(bdrv_drivers);
|
QLIST_HEAD_INITIALIZER(bdrv_drivers);
|
||||||
|
|
||||||
static void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
|
|
||||||
int nr_sectors);
|
|
||||||
static void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
|
|
||||||
int nr_sectors);
|
|
||||||
static void bdrv_dirty_bitmap_truncate(BlockDriverState *bs);
|
static void bdrv_dirty_bitmap_truncate(BlockDriverState *bs);
|
||||||
/* If non-zero, use only whitelisted block drivers */
|
/* If non-zero, use only whitelisted block drivers */
|
||||||
static int use_bdrv_whitelist;
|
static int use_bdrv_whitelist;
|
||||||
|
@ -5787,7 +5783,7 @@ void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap)
|
||||||
hbitmap_reset(bitmap->bitmap, 0, bitmap->size);
|
hbitmap_reset(bitmap->bitmap, 0, bitmap->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
|
void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
|
||||||
int nr_sectors)
|
int nr_sectors)
|
||||||
{
|
{
|
||||||
BdrvDirtyBitmap *bitmap;
|
BdrvDirtyBitmap *bitmap;
|
||||||
|
@ -5799,7 +5795,7 @@ static void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
|
void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
|
||||||
int nr_sectors)
|
int nr_sectors)
|
||||||
{
|
{
|
||||||
BdrvDirtyBitmap *bitmap;
|
BdrvDirtyBitmap *bitmap;
|
||||||
|
|
|
@ -626,4 +626,8 @@ bool blk_dev_is_tray_open(BlockBackend *blk);
|
||||||
bool blk_dev_is_medium_locked(BlockBackend *blk);
|
bool blk_dev_is_medium_locked(BlockBackend *blk);
|
||||||
void blk_dev_resize_cb(BlockBackend *blk);
|
void blk_dev_resize_cb(BlockBackend *blk);
|
||||||
|
|
||||||
|
void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector, int nr_sectors);
|
||||||
|
void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
|
||||||
|
int nr_sectors);
|
||||||
|
|
||||||
#endif /* BLOCK_INT_H */
|
#endif /* BLOCK_INT_H */
|
||||||
|
|
Loading…
Reference in New Issue