+void vfio_migration_set_error(int ret)
+{
+ if (migration_is_running()) {
+ migration_file_set_error(ret, NULL);
+ }
+}
--
* The change looks okay. But with the 'Error *err = NULL' parameter,
the error (ret) is also not passed on. Could we call
migration_file_set_error(ret, errp), instead of defining
'vfio_migration_set_error'?
So you mean open coding :
if (migration_is_running()) {
migration_file_set_error(ret, errp);
}
?
Yes. I think it is a good idea to limit proliferation of this wrapper.
Ideally, we wouldn't need to use migration_file_set_error() at all but
we still have some callback routines not taking an Error **parameter
unfortunately.
IOMMU notifiers :
vfio_iommu_map_notify
vfio_iommu_map_dirty_notify
MemoryListener handlers :
vfio_listener_log_global_stop
vfio_listener_log_sync
I will send a series removing vfio_migration_set_error() to improve
error reporting in the dirty tracking handlers. This makes sense,
thanks for reminding me.
C.
Because currently it accepts only one
'ret' parameter, later adding *errp to it would entail changing all
call sites.
Thank you.
---
- Prasad