Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: Zac Medico <zmedico@g.o>, gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Re: [PATCH] file_copy: handle EUCLEAN from copy_file_range (bug 674332)
Date: Fri, 04 Jan 2019 00:40:22
Message-Id: 785f47fc-06a0-ecf3-6bca-7abed19210ef@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] file_copy: handle EUCLEAN from copy_file_range (bug 674332) by Zac Medico
1 On 1/2/19 2:29 PM, 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
25 The EUCLEAN might be triggered by a kernel bug, so I don't want to merge
26 a patch until we have more info.
27 --
28 Thanks,
29 Zac

Attachments

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