Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: "Michał Górny" <mgorny@g.o>, gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] movefile: support in-kernel file copying on Linux (bug 607868)
Date: Thu, 02 Mar 2017 19:39:57
Message-Id: a48baa88-bb33-2994-98a1-d2909a50770c@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] movefile: support in-kernel file copying on Linux (bug 607868) by "Michał Górny"
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