mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 10:16:41 +00:00
plugin/amdgpu: Also don't print 'plugin failed' in criu
We already don't treat it as error in the plugin itself, but after
returning -1 from RESUME_DEVICES_LATE hook we print debug message in
criu about failed plugin, let's return 0 instead.
While on it let's replace ret to exit_code.
Fixes: a9cbdad76 ("plugin/amdgpu: Don't print error for "No such process" during resume")
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
59599dacdd
commit
b689a6710c
1 changed files with 6 additions and 5 deletions
|
|
@ -1985,7 +1985,7 @@ CR_PLUGIN_REGISTER_HOOK(CR_PLUGIN_HOOK__UPDATE_VMA_MAP, amdgpu_plugin_update_vma
|
|||
int amdgpu_plugin_resume_devices_late(int target_pid)
|
||||
{
|
||||
struct kfd_ioctl_criu_args args = { 0 };
|
||||
int fd, ret = 0;
|
||||
int fd, exit_code = 0;
|
||||
|
||||
pr_info("Inside %s for target pid = %d\n", __func__, target_pid);
|
||||
|
||||
|
|
@ -1999,15 +1999,16 @@ int amdgpu_plugin_resume_devices_late(int target_pid)
|
|||
args.op = KFD_CRIU_OP_RESUME;
|
||||
pr_info("Calling IOCTL to start notifiers and queues\n");
|
||||
if (kmtIoctl(fd, AMDKFD_IOC_CRIU_OP, &args) == -1) {
|
||||
if (errno == ESRCH)
|
||||
if (errno == ESRCH) {
|
||||
pr_info("Pid %d has no kfd process info\n", target_pid);
|
||||
else
|
||||
} else {
|
||||
pr_perror("restore late ioctl failed");
|
||||
ret = -1;
|
||||
exit_code = -1;
|
||||
}
|
||||
}
|
||||
|
||||
close(fd);
|
||||
return ret;
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
CR_PLUGIN_REGISTER_HOOK(CR_PLUGIN_HOOK__RESUME_DEVICES_LATE, amdgpu_plugin_resume_devices_late)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue