Note that splice() itself doesn't work with an O_APPEND outfd:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
efc968d450e013049a662d22727cf132618dcb2f
Hence for the real splice() codepath itself no changes are needed, as splice
will just fail with EINVAL triggering the fallback code.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
return 0;
}
- if (tofd != -1 && offset != (off_t)-1) {
+ if (tofd != -1 && offset != (off_t)VFS_PWRITE_APPEND_OFFSET) {
if (lseek(tofd, offset, SEEK_SET) == -1) {
if (errno != ESPIPE) {
return -1;