1 |
EXT4 can set the errno to EUCLEAN for copy_file_range. |
2 |
|
3 |
Bug: https://bugs.gentoo.org/674332 |
4 |
Signed-off-by: Zac Medico <zmedico@g.o> |
5 |
--- |
6 |
src/portage_util_file_copy_reflink_linux.c | 2 +- |
7 |
1 file changed, 1 insertion(+), 1 deletion(-) |
8 |
|
9 |
diff --git a/src/portage_util_file_copy_reflink_linux.c b/src/portage_util_file_copy_reflink_linux.c |
10 |
index 352342c06..1422232a5 100644 |
11 |
--- a/src/portage_util_file_copy_reflink_linux.c |
12 |
+++ b/src/portage_util_file_copy_reflink_linux.c |
13 |
@@ -271,7 +271,7 @@ _reflink_linux_file_copy(PyObject *self, PyObject *args) |
14 |
|
15 |
if (copyfunc_ret < 0) { |
16 |
error = errno; |
17 |
- if ((errno == EXDEV || errno == ENOSYS || errno == EOPNOTSUPP) && |
18 |
+ if ((errno == EXDEV || errno == ENOSYS || errno == EOPNOTSUPP || errno == EUCLEAN) && |
19 |
copyfunc == cfr_wrapper) { |
20 |
/* Use sendfile instead of copy_file_range for |
21 |
* cross-device copies, or when the copy_file_range |
22 |
-- |
23 |
2.18.1 |