[CRIU] [PATCH] aio: Add plugin for waiting AIO in-flight reqs

Kirill Tkhai ktkhai at virtuozzo.com
Tue Apr 5 06:10:01 PDT 2016



On 05.04.2016 16:04, Cyrill Gorcunov wrote:
> On Tue, Apr 05, 2016 at 01:10:50PM +0300, Kirill Tkhai wrote:
>> This is possibility to wait AIO in-flight reqs before
>> we collect AIO rings info.
>>
>> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> ...
>>  
>> -int parasite_collect_aios(struct parasite_ctl *ctl, struct vm_area_list *vmas)
>> +int parasite_collect_aios(struct parasite_ctl *ctl, pid_t pid, struct vm_area_list *vmas)
>>  {
>>  	struct vma_area *vma;
>>  	struct parasite_check_aios_args *aa;
>>  	struct parasite_aio *pa;
>> -	int i;
>> +	int i, ret;
>>  
>>  	if (!vmas->nr_aios)
>>  		return 0;
>> @@ -106,6 +107,14 @@ int parasite_collect_aios(struct parasite_ctl *ctl, struct vm_area_list *vmas)
>>  	}
>>  	aa->nr_rings = vmas->nr_aios;
>>  
>> +	ret = run_plugins(AIO_WAIT_REQS, pid);
>> +	if (ret == -ENOTSUP) {
>> +		pr_info_once("AIO_WAIT_REQS plugin was not found\n");
>> +	} else if (ret < 0) {
>> +		pr_err("Can't execute AIO_WAIT_REQS plugin: ret=%d\n", ret);
>> +		return -1;
>> +	}
>> +
> 
> What about restore stage, we won't need plugin there?

We don't need it on restore stage, because aio restores using standard linux syscalls.


More information about the CRIU mailing list