]> Cypherpunks repositories - gostls13.git/commit
internal/poll: drop redundant ENOSYS in CopyFileRange
authorAndy Pan <panjf2000@gmail.com>
Tue, 6 Sep 2022 12:08:05 +0000 (20:08 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 9 Sep 2022 15:35:09 +0000 (15:35 +0000)
commit4f3246c6e97225d43775090f272a4d5c34ffb5a8
tree685f3133c736023e8eb438ef1c619e1856d1306b
parent86477e507fce38128b6696bcb036da026966c9d5
internal/poll: drop redundant ENOSYS in CopyFileRange

Update CL 425881 and CL 428396

I browsed the source code related to copy_file_range in the kernel and found that the latest kernel may still return EXDEV errors in copy_file_range(2) due to certain cases, for details see: https://elixir.bootlin.com/linux/v5.19.7/source/fs/read_write.c#L1559, https://elixir.bootlin.com/linux/v5.19.7/source/fs/read_write.c#L1479, and
https://elixir.bootlin.com/linux/v5.19.7/source/fs/read_write.c#L1439.

Therefore, the EXDEV still needs to be kept, but the ENOSYS error can be safely removed.

Change-Id: I47026b8dd33f7ffc4de1306af6b67c7b4d2062d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/428555
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Andy Pan <panjf2000@gmail.com>
src/internal/poll/copy_file_range_linux.go