Change-Id: Ia6a2768be0e044112831c278d88ff31ba3caa9f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/609298
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
}
func (f *File) readFrom(r io.Reader) (written int64, handled bool, err error) {
- // copy_file_range(2) doesn't supports destinations opened with
+ // copy_file_range(2) doesn't support destinations opened with
// O_APPEND, so don't bother to try zero-copy with these system calls.
//
// Visit https://man.freebsd.org/cgi/man.cgi?copy_file_range(2)#ERRORS for details.
// We can employ sendfile(2) when copy_file_range(2) fails to handle the copy.
// sendfile(2) enabled file-to-file copying since Linux 2.6.33 and Go requires
- // Linux 3.17 or later, so we're good to go.
+ // Linux 3.2 or later, so we're good to go.
// Check out https://man7.org/linux/man-pages/man2/sendfile.2.html#DESCRIPTION for more details.
rerr := sc.Read(func(fd uintptr) bool {
written, err, handled = poll.SendFile(&f.pfd, int(fd), remain)