HomeFreeBSD

libzfs, libzfs_core: send: always write to pipe

Description

libzfs, libzfs_core: send: always write to pipe

By introducing lzc_send_wrapper() and routing all ZFS_IOC_SEND*
users through it, we fix a Linux 5.10-introduced bug (see comment)

This is all /transparent/ to the users API, ABI, and usage-wise,
and disabled on FreeBSD and if the output is already a pipe,
and transparently nestable (i.e. zfs_send_one() is wrapped,
but so is lzc_send_redacted() it calls to ‒ this wouldn't be strictly
necessary if ZFS_IOC_SEND_PROGRESS wasn't strictly denominational w.r.t.
the descriptor the send is happening on)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Co-authored-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11445
Closes #13133

Details

Provenance
наб <nabijaczleweli@nabijaczleweli.xyz>Authored on Feb 21 2022, 1:31 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 8 2022, 5:33 PM
Parents
rGfbbea09db965: libzfs_core: simplify max_pipe_buffer(), return new max
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG3a909fe33efa: libzfs, libzfs_core: send: always write to pipe (authored by наб <nabijaczleweli@nabijaczleweli.xyz>).Mar 8 2022, 5:33 PM