1 |
On 03/02/2017 08:24 AM, Michał Górny wrote: |
2 |
>> + if (copyfunc_ret < 0) { |
3 |
>> + if ((errno == EXDEV || errno == ENOSYS) && |
4 |
>> + copyfunc == cfr_wrapper) { |
5 |
>> + /* Use sendfile instead of copy_file_range for |
6 |
>> + * cross-device copies, or when the copy_file_range |
7 |
>> + * syscall is not available (less than Linux 4.5). |
8 |
>> + */ |
9 |
>> + copyfunc = sendfile; |
10 |
>> + copyfunc_ret = copyfunc(fd_out, |
11 |
>> + fd_in, |
12 |
>> + &offset_out, |
13 |
>> + offset_hole - offset_data); |
14 |
>> + |
15 |
>> + if (copyfunc_ret < 0) { |
16 |
> |
17 |
> I think you still should have a proper fallback for sendfile() refusing |
18 |
> to do its job. |
19 |
|
20 |
Yeah, that case seems easy enough to handle, so I'll look into adding a |
21 |
fallback. |
22 |
-- |
23 |
Thanks, |
24 |
Zac |