1 |
On Wed, Mar 15, 2017 at 3:25 PM, Brian Dolbec <dolsen@g.o> wrote: |
2 |
> On Fri, 3 Mar 2017 18:18:50 -0800 |
3 |
> Zac Medico <zmedico@g.o> wrote: |
4 |
> |
5 |
>> Perform in-kernel file copying when possible, and also support |
6 |
>> reflinks and sparse files. If the optimized implementation |
7 |
>> fails at runtime, gracefully fallback to a plain read/write |
8 |
>> loop. |
9 |
>> |
10 |
>> Compile-time and run-time fallbacks are implemented, so that |
11 |
>> any incompatiblities will be handled gracefully. For example, |
12 |
>> if the code is compiled on a system that supports the |
13 |
>> copy_file_range syscall, but at run-time an older kernel that |
14 |
>> does not support this syscall is detected, it will be handled |
15 |
>> gracefully. There are similar fallbacks for lack of lseek |
16 |
>> SEEK_DATA and sendfile support. |
17 |
>> |
18 |
>> X-Gentoo-Bug: 607868 |
19 |
>> X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=607868 |
20 |
>> --- |
21 |
>> [PATCH v3] Changes: |
22 |
>> * Add function documentation comments |
23 |
>> * Rename do_lseek function to do_lseek_data |
24 |
>> * Fix do_lseek_data to handle sparse blocks at EOF, and |
25 |
>> fix _reflink_linux_file_copy to call ftruncate |
26 |
>> * Eliminate indirection in python copyfile function |
27 |
>> * Cleaned up error variable handling |
28 |
>> * Added lseek calls to ensure correct revovery from EINTR |
29 |
>> * Added buf != NULL call before free(buf) |
30 |
>> |
31 |
>> pym/portage/tests/util/file_copy/__init__.py | 0 |
32 |
>> pym/portage/tests/util/file_copy/__test__.py | 0 |
33 |
>> pym/portage/tests/util/file_copy/test_copyfile.py | 71 ++++ |
34 |
>> pym/portage/util/file_copy/__init__.py | 36 ++ |
35 |
>> pym/portage/util/movefile.py | 4 +- |
36 |
>> setup.py | 9 + |
37 |
>> src/portage_util_file_copy_reflink_linux.c | 385 |
38 |
>> ++++++++++++++++++++++ 7 files changed, 504 insertions(+), 1 |
39 |
>> deletion(-) create mode 100644 |
40 |
> |
41 |
> |
42 |
> I'd say go for it, merge. There's been no additional feedback or review |
43 |
|
44 |
Thanks, merged: |
45 |
|
46 |
https://gitweb.gentoo.org/proj/portage.git/commit/?id=8ab5c8835931fd9ec098dbf4c5f416eb32e4a3a4 |
47 |
-- |
48 |
Thanks, |
49 |
Zac |