[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 01/14] dirty-bitmap: operate with int64_t amount
From: |
Jeff Cody |
Subject: |
[Qemu-block] [PULL 01/14] dirty-bitmap: operate with int64_t amount |
Date: |
Tue, 19 Jul 2016 20:20:49 -0400 |
From: "Denis V. Lunev" <address@hidden>
Underlying HBitmap operates even with uint64_t. Thus this change is safe.
This would be useful f.e. to mark entire bitmap dirty in one call.
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Message-id: address@hidden
CC: Stefan Hajnoczi <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
CC: Jeff Cody <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>
---
block/dirty-bitmap.c | 6 +++---
include/block/block_int.h | 2 +-
include/block/dirty-bitmap.h | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 4902ca5..f2bfdcf 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -326,14 +326,14 @@ void bdrv_dirty_iter_init(BdrvDirtyBitmap *bitmap,
HBitmapIter *hbi)
}
void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap,
- int64_t cur_sector, int nr_sectors)
+ int64_t cur_sector, int64_t nr_sectors)
{
assert(bdrv_dirty_bitmap_enabled(bitmap));
hbitmap_set(bitmap->bitmap, cur_sector, nr_sectors);
}
void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap,
- int64_t cur_sector, int nr_sectors)
+ int64_t cur_sector, int64_t nr_sectors)
{
assert(bdrv_dirty_bitmap_enabled(bitmap));
hbitmap_reset(bitmap->bitmap, cur_sector, nr_sectors);
@@ -361,7 +361,7 @@ void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap,
HBitmap *in)
}
void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector,
- int nr_sectors)
+ int64_t 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 a6b13ad..09be16f 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -783,7 +783,7 @@ void blk_dev_eject_request(BlockBackend *blk, bool force);
bool blk_dev_is_tray_open(BlockBackend *blk);
bool blk_dev_is_medium_locked(BlockBackend *blk);
-void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector, int nr_sectors);
+void bdrv_set_dirty(BlockDriverState *bs, int64_t cur_sector, int64_t nr_sect);
bool bdrv_requests_pending(BlockDriverState *bs);
void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out);
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index 80afe60..ee3388f 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -33,9 +33,9 @@ DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap
*bitmap);
int bdrv_get_dirty(BlockDriverState *bs, BdrvDirtyBitmap *bitmap,
int64_t sector);
void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap,
- int64_t cur_sector, int nr_sectors);
+ int64_t cur_sector, int64_t nr_sectors);
void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap,
- int64_t cur_sector, int nr_sectors);
+ int64_t cur_sector, int64_t nr_sectors);
void bdrv_dirty_iter_init(BdrvDirtyBitmap *bitmap, struct HBitmapIter *hbi);
void bdrv_set_dirty_iter(struct HBitmapIter *hbi, int64_t offset);
int64_t bdrv_get_dirty_count(BdrvDirtyBitmap *bitmap);
--
1.9.3
- [Qemu-block] [PULL 00/14] Block patches, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 03/14] mirror: create mirror_throttle helper, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 02/14] mirror: make sectors_in_flight int64_t, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 01/14] dirty-bitmap: operate with int64_t amount,
Jeff Cody <=
- [Qemu-block] [PULL 04/14] mirror: create mirror_dirty_init helper for mirror_run, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 05/14] block: remove extra condition in bdrv_can_write_zeroes_with_unmap, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 06/14] mirror: optimize dirty bitmap filling in mirror_run a bit, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 07/14] mirror: efficiently zero out target, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 08/14] mirror: improve performance of mirroring of empty disk, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 09/14] mirror: fix request throttling in drive-mirror, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 10/14] block/gluster: rename [server, volname, image] -> [host, volume, path], Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 11/14] block/gluster: code cleanup, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 12/14] block/gluster: deprecate rdma support, Jeff Cody, 2016/07/19
- [Qemu-block] [PULL 14/14] block/gluster: add support for multiple gluster servers, Jeff Cody, 2016/07/19