[CRIU] [RFC PATCH 2/7] lazy-pages: make uffd_{copy, zero} return 0 on success

Mike Rapoport mike.rapoport at gmail.com
Tue Nov 15 07:39:29 PST 2016


On Tue, Nov 15, 2016 at 5:41 PM, Pavel Emelyanov <xemul at virtuozzo.com> wrote:
> On 11/14/2016 06:37 PM, Mike Rapoport wrote:
>> In early days of uffd.c return value from uffd_copy was used to count
>> transferred pages. Since this is not the case anymore we can use 0 as
>> success.
>>
>> Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
>> ---
>>  criu/uffd.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/criu/uffd.c b/criu/uffd.c
>> index 3eddf85..73ae09e 100644
>> --- a/criu/uffd.c
>> +++ b/criu/uffd.c
>> @@ -543,7 +543,7 @@ static int uffd_copy(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
>
> There's no uffd_copy() in current criu-dev. What patch is missing in it?

Forgot to mention that this patchset is on top of 11 uffd improvements. Sorry.

>>
>>       lpi->copied_pages += nr_pages;
>>
>> -     return uffdio_copy.copy;
>> +     return 0;
>>  }
>>
>>  static int uffd_zero(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
>> @@ -565,7 +565,7 @@ static int uffd_zero(struct lazy_pages_info *lpi, __u64 address, int nr_pages)
>>               return -1;
>>       }
>>
>> -     return len;
>> +     return 0;
>>  }
>>
>>  static int uffd_handle_pages(struct lazy_pages_info *lpi, __u64 address, int nr)
>>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu



-- 
Sincerely yours,
Mike.


More information about the CRIU mailing list