Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] file_copy: handle EUCLEAN from copy_file_range (bug 674332)
Date: Thu, 03 Jan 2019 04:55:30
Message-Id: 1546491323.1109.1.camel@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] file_copy: handle EUCLEAN from copy_file_range (bug 674332) by Zac Medico
1 On Wed, 2019-01-02 at 14:29 -0800, Zac Medico wrote:
2 > EXT4 can set the errno to EUCLEAN for copy_file_range.
3 >
4 > Bug: https://bugs.gentoo.org/674332
5 > Signed-off-by: Zac Medico <zmedico@g.o>
6 > ---
7 > src/portage_util_file_copy_reflink_linux.c | 2 +-
8 > 1 file changed, 1 insertion(+), 1 deletion(-)
9 >
10 > diff --git a/src/portage_util_file_copy_reflink_linux.c b/src/portage_util_file_copy_reflink_linux.c
11 > index 352342c06..1422232a5 100644
12 > --- a/src/portage_util_file_copy_reflink_linux.c
13 > +++ b/src/portage_util_file_copy_reflink_linux.c
14 > @@ -271,7 +271,7 @@ _reflink_linux_file_copy(PyObject *self, PyObject *args)
15 >
16 > if (copyfunc_ret < 0) {
17 > error = errno;
18 > - if ((errno == EXDEV || errno == ENOSYS || errno == EOPNOTSUPP) &&
19 > + if ((errno == EXDEV || errno == ENOSYS || errno == EOPNOTSUPP || errno == EUCLEAN) &&
20 > copyfunc == cfr_wrapper) {
21 > /* Use sendfile instead of copy_file_range for
22 > * cross-device copies, or when the copy_file_range
23
24 I'm pretty sure EUCLEAN is not portable to non-glibc/Linux systems.
25
26 --
27 Best regards,
28 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies