[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 74/76] block: add bdrv_set_dirty()/bdrv_reset_dirty()
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 74/76] block: add bdrv_set_dirty()/bdrv_reset_dirty() to block_int.h |
Date: |
Tue, 28 Apr 2015 17:00:56 +0200 |
From: Stefan Hajnoczi <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 12 ++++--------
include/block/block_int.h | 4 ++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/block.c b/block.c
index 1f0a4e2..3b865ee 100644
--- a/block.c
+++ b/block.c
@@ -110,10 +110,6 @@ static QTAILQ_HEAD(, BlockDriverState) graph_bdrv_states =
static QLIST_HEAD(, BlockDriver) 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);
/* If non-zero, use only whitelisted block drivers */
static int use_bdrv_whitelist;
@@ -5787,8 +5783,8 @@ void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap)
hbitmap_reset(bitmap->bitmap, 0, bitmap->size);
}
-static void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
- int nr_sectors)
+void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
+ int nr_sectors)
{
BdrvDirtyBitmap *bitmap;
QLIST_FOREACH(bitmap, &bs->dirty_bitmaps, list) {
@@ -5799,8 +5795,8 @@ static void bdrv_set_dirty(BlockDriverState *bs, int64_t
cur_sector,
}
}
-static void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
- int nr_sectors)
+void bdrv_reset_dirty(BlockDriverState *bs, int64_t cur_sector,
+ int nr_sectors)
{
BdrvDirtyBitmap *bitmap;
QLIST_FOREACH(bitmap, &bs->dirty_bitmaps, list) {
diff --git a/include/block/block_int.h b/include/block/block_int.h
index e0d5561..5ad20b2 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -626,4 +626,8 @@ bool blk_dev_is_tray_open(BlockBackend *blk);
bool blk_dev_is_medium_locked(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 */
--
1.8.3.1
- [Qemu-block] [PULL 64/76] hbitmap: truncate tests, (continued)
- [Qemu-block] [PULL 64/76] hbitmap: truncate tests, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 63/76] block: Resize bitmaps on bdrv_truncate, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 65/76] iotests: add invalid input incremental backup tests, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 68/76] iotests: add incremental backup failure recovery test, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 67/76] iotests: add simple incremental backup case, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 70/76] block/mirror: Always call block_job_sleep_ns(), Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 69/76] iotests: add incremental backup granularity tests, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 71/76] block/dmg: make it modular, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 72/76] vmdk: Widen before shifting 32 bit header field, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 73/76] block: replace bdrv_states iteration with bdrv_next(), Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 74/76] block: add bdrv_set_dirty()/bdrv_reset_dirty() to block_int.h,
Kevin Wolf <=
- [Qemu-block] [PULL 75/76] block: extract bdrv_setup_io_funcs(), Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 76/76] block: move I/O request processing to block/io.c, Kevin Wolf, 2015/04/28
- [Qemu-block] [PULL 66/76] iotests: add QMP event waiting queue, Kevin Wolf, 2015/04/28
- Re: [Qemu-block] [Qemu-devel] [PULL 00/76] Block patches, Peter Maydell, 2015/04/28