Skip to content

Commit 1f21670

Browse files
avihai1122legoater
authored andcommitted
vfio/migration: Rename vfio_devices_all_dirty_tracking()
vfio_devices_all_dirty_tracking() is used to check if dirty page log sync is needed. However, besides checking the dirty page tracking status, it also checks the pre_copy_dirty_page_tracking flag. Rename it to vfio_devices_log_sync_needed() which reflects its purpose more accurately and makes the code clearer as there are already several helpers with similar names. Signed-off-by: Avihai Horon <[email protected]> Reviewed-by: Joao Martins <[email protected]> Tested-by: Joao Martins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Cédric Le Goater <[email protected]>
1 parent 6e9df66 commit 1f21670

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hw/vfio/common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ bool vfio_devices_all_dirty_tracking_started(
191191
bcontainer->dirty_pages_started;
192192
}
193193

194-
static bool vfio_devices_all_dirty_tracking(VFIOContainerBase *bcontainer)
194+
static bool vfio_log_sync_needed(const VFIOContainerBase *bcontainer)
195195
{
196196
VFIODevice *vbasedev;
197197

@@ -1364,7 +1364,7 @@ static void vfio_listener_log_sync(MemoryListener *listener,
13641364
return;
13651365
}
13661366

1367-
if (vfio_devices_all_dirty_tracking(bcontainer)) {
1367+
if (vfio_log_sync_needed(bcontainer)) {
13681368
ret = vfio_sync_dirty_bitmap(bcontainer, section, &local_err);
13691369
if (ret) {
13701370
error_report_err(local_err);

0 commit comments

Comments
 (0)