diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-23 18:45:51 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-23 18:45:51 +0000 |
commit | 3bd958e646e508a3e80f5fb28f44384eed671f5d (patch) | |
tree | 59c64eff7f35adeaabe15243171164094a9c23e1 /kde-frameworks/kio/files/kio-5.104.0-handle-copy_file_range-failing-w-ENOENT.patch | |
parent | c8c3804588db08dae281504dd79ef71741cd8dc3 (diff) |
gentoo auto-resync : 23:03:2023 - 18:45:51
Diffstat (limited to 'kde-frameworks/kio/files/kio-5.104.0-handle-copy_file_range-failing-w-ENOENT.patch')
-rw-r--r-- | kde-frameworks/kio/files/kio-5.104.0-handle-copy_file_range-failing-w-ENOENT.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.104.0-handle-copy_file_range-failing-w-ENOENT.patch b/kde-frameworks/kio/files/kio-5.104.0-handle-copy_file_range-failing-w-ENOENT.patch new file mode 100644 index 000000000000..ae10923bb774 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.104.0-handle-copy_file_range-failing-w-ENOENT.patch @@ -0,0 +1,33 @@ +From 05dee56f45dae37745f21a95e19a149b69e719e3 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt <fabian@ritter-vogt.de> +Date: Mon, 27 Feb 2023 09:30:05 +0100 +Subject: [PATCH] Also handle copy_file_range failing with ENOENT + +There appears to be a kernel bug (?) that CIFS fails with ENOENT on +copy_file_range. + +coreutils had to work around this as well, see the included link. + +(cherry picked from commit 00840d05abd875e1901b655ed6af3bc76ef48433) +--- + src/ioslaves/file/file_unix.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp +index 1865b852d9..8d005daf81 100644 +--- a/src/ioslaves/file/file_unix.cpp ++++ b/src/ioslaves/file/file_unix.cpp +@@ -822,7 +822,9 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl, int _mode, JobF + const ssize_t copiedBytes = ::copy_file_range(srcFile.handle(), nullptr, destFile.handle(), nullptr, s_maxIPCSize, 0); + + if (copiedBytes == -1) { +- if (errno == EINVAL || errno == EXDEV) { ++ // ENOENT is returned on cifs in some cases, probably a kernel bug ++ // (s.a. https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=7fc84d1c0f6b35231b0b4577b70aaa26bf548a7c) ++ if (errno == EINVAL || errno == EXDEV || errno == ENOENT) { + break; // will continue with next copy mechanism + } + +-- +GitLab + |