copy: handle copy_file_range() weirdness on procfs/sysfs
authorLennart Poettering <lennart@poettering.net>
Fri, 26 Feb 2021 09:25:24 +0000 (10:25 +0100)
committerJan Macku <jamacku@redhat.com>
Wed, 28 Jul 2021 11:00:36 +0000 (13:00 +0200)
commitf13a7eab34e675a88634c053682ecb2af43a432c
treead6b204cc035701154feb30eebfc3306c538a7c6
parent2991ba196d034aef170acbf0d73533f79c66b94e
copy: handle copy_file_range() weirdness on procfs/sysfs

This addresses the issue described in https://lwn.net/Articles/846403/
and makes sure we will be able to stream bytes from procfs/sysfs via
copy_bytes() if people ask us to.

Based on: ee1aa61c4710ae567a2b844e0f0bb8cb0456ab8c

Related: ##1984406

(cherry picked from commit 8df650c7c5adc2bb24a0077d8332f5ee342e7fd8)
src/basic/copy.c
src/test/test-copy.c