ruby-changes:62748
From: Masaki <ko1@a...>
Date: Sat, 29 Aug 2020 15:41:55 +0900 (JST)
Subject: [ruby-changes:62748] 93df301048 (master): IO.copy_stream: handle ENOTSUP on copy_file_range(2)
https://git.ruby-lang.org/ruby.git/commit/?id=93df301048 From 93df3010482ad52e5ada2e416c996005da956e1e Mon Sep 17 00:00:00 2001 From: Masaki Matsushita <glass.saga@g...> Date: Sat, 29 Aug 2020 15:38:07 +0900 Subject: IO.copy_stream: handle ENOTSUP on copy_file_range(2) fallback to other methods on ENOTSUP. some RedHat kernels may return ENOTSUP on an NFS mount. [Feature #16965] diff --git a/io.c b/io.c index 5e4fdd5..3b3ce3f 100644 --- a/io.c +++ b/io.c @@ -11312,6 +11312,11 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp) https://github.com/ruby/ruby/blob/trunk/io.c#L11312 #ifdef ENOSYS case ENOSYS: #endif +#ifdef ENOTSUP + /* some RedHat kernels may return ENOTSUP on an NFS mount. + see also: [Feature #16965] */ + case ENOTSUP: +#endif return 0; case EAGAIN: #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/