diff options
author | наб <[email protected]> | 2022-02-21 02:31:32 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-03-08 09:33:08 -0800 |
commit | 3a909fe33efa17f09f83da25442b6a4b2aa2b27d (patch) | |
tree | fd088bb7a91ecf10be5bbe8af4266020de0dccc4 /include/libzfs_core.h | |
parent | fbbea09db965d5ed7fe554db0fe33e80b98dadd5 (diff) |
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 <[email protected]>
Reviewed-by: Paul Dagnelie <[email protected]>
Co-authored-by: Rich Ercolani <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11445
Closes #13133
Diffstat (limited to 'include/libzfs_core.h')
-rw-r--r-- | include/libzfs_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libzfs_core.h b/include/libzfs_core.h index 7acc03fc7..b826e94c4 100644 --- a/include/libzfs_core.h +++ b/include/libzfs_core.h @@ -86,6 +86,7 @@ enum lzc_send_flags { LZC_SEND_FLAG_SAVED = 1 << 4, }; +_LIBZFS_CORE_H int lzc_send_wrapper(int (*)(int, void *), int, void *); _LIBZFS_CORE_H int lzc_send(const char *, const char *, int, enum lzc_send_flags); _LIBZFS_CORE_H int lzc_send_resume(const char *, const char *, int, |