mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
block/dirty-bitmap: refactor bdrv_dirty_bitmap_next
bdrv_dirty_bitmap_next is always used in same pattern. So, split it into _next and _first, instead of combining two functions into one and add FOR_EACH_DIRTY_BITMAP macro. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20190916141911.5255-5-vsementsov@virtuozzo.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
1e63830160
commit
ef9041a7b8
5 changed files with 18 additions and 18 deletions
|
@ -283,9 +283,7 @@ static int init_dirty_bitmap_migration(void)
|
|||
for (bs = bdrv_next_all_states(NULL); bs; bs = bdrv_next_all_states(bs)) {
|
||||
const char *name = bdrv_get_device_or_node_name(bs);
|
||||
|
||||
for (bitmap = bdrv_dirty_bitmap_next(bs, NULL); bitmap;
|
||||
bitmap = bdrv_dirty_bitmap_next(bs, bitmap))
|
||||
{
|
||||
FOR_EACH_DIRTY_BITMAP(bs, bitmap) {
|
||||
if (!bdrv_dirty_bitmap_name(bitmap)) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue