diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2020-11-02 12:01:33 +0100 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-11-06 00:15:21 +0000 |
commit | 1f2e58d89b754c28ba7448ead7d8d9ae8957ab49 (patch) | |
tree | 35f192f9cc3f5dcb50e1ae28f50733768a5f4a9e | |
parent | 0e953add9656c32a788e06438cd7b533e968b7f8 (diff) | |
download | go-1f2e58d89b754c28ba7448ead7d8d9ae8957ab49.tar.gz go-1f2e58d89b754c28ba7448ead7d8d9ae8957ab49.zip |
[release-branch.go1.15] internal/poll: treat copy_file_range EIO as not-handled
For #42334
Fixes #42369
Change-Id: Ife51df4e7d2539a04393abfdec45e3f902975fca
Reviewed-on: https://go-review.googlesource.com/c/go/+/266940
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 633f9e206045176a12c301eb2c249c1c1d9a5d2e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/267917
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-rw-r--r-- | src/internal/poll/copy_file_range_linux.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/internal/poll/copy_file_range_linux.go b/src/internal/poll/copy_file_range_linux.go index 09de299ff7..24bee614a6 100644 --- a/src/internal/poll/copy_file_range_linux.go +++ b/src/internal/poll/copy_file_range_linux.go @@ -41,7 +41,7 @@ func CopyFileRange(dst, src *FD, remain int64) (written int64, handled bool, err // use copy_file_range(2) again. atomic.StoreInt32(©FileRangeSupported, 0) return 0, false, nil - case syscall.EXDEV, syscall.EINVAL, syscall.EOPNOTSUPP, syscall.EPERM: + case syscall.EXDEV, syscall.EINVAL, syscall.EIO, syscall.EOPNOTSUPP, syscall.EPERM: // Prior to Linux 5.3, it was not possible to // copy_file_range across file systems. Similarly to // the ENOSYS case above, if we see EXDEV, we have @@ -53,6 +53,9 @@ func CopyFileRange(dst, src *FD, remain int64) (written int64, handled bool, err // file. This is another case where no data has been // transfered, so we consider it unhandled. // + // If src and dst are on CIFS, we can see EIO. + // See issue #42334. + // // If the file is on NFS, we can see EOPNOTSUPP. // See issue #40731. // |