1 |
On 11/01/2017 09:31 AM, Brian Dolbec wrote: |
2 |
> On Tue, 24 Oct 2017 11:41:37 -0700 |
3 |
> Zac Medico <zmedico@g.o> wrote: |
4 |
> |
5 |
>> The sendfile *offset parameter refers to the input file offest, so |
6 |
>> it cannot be used in the same way as the copy_file_range *off_out |
7 |
>> parameter. Therefore, add sf_wrapper function which implements the |
8 |
>> *off_out behavior for sendfile. |
9 |
>> |
10 |
>> Also update cfr_wrapper so that it does not rely on the fd_in file |
11 |
>> offset, and remove corresponding fd_in lseek calls which are no |
12 |
>> longer needed. |
13 |
>> |
14 |
>> The file offset of fd_in is now completely unused, except in the |
15 |
>> plain read/write loop, where lseek is called prior to entering |
16 |
>> the loop. |
17 |
>> |
18 |
>> Bug: https://bugs.gentoo.org/635126 |
19 |
>> --- |
20 |
>> [PATCH v5] eliminates all reliance on the file offset of fd_in, |
21 |
>> except in the plain read/write loop, where lseek is called prior |
22 |
>> to entering the loop. |
23 |
>> |
24 |
>> src/portage_util_file_copy_reflink_linux.c | 88 |
25 |
>> ++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 29 |
26 |
>> deletions(-) |
27 |
> |
28 |
> |
29 |
> Looks good, has been checked by chutzpah |
30 |
> |
31 |
|
32 |
Thanks, merged: |
33 |
|
34 |
https://gitweb.gentoo.org/proj/portage.git/commit/?id=5b6cf172e378f6da88e9634aa4e89f2f34390659 |
35 |
-- |
36 |
Thanks, |
37 |
Zac |