zfs/lib/libzfs
Tom Caputi 870e7a52c1 Fix noop receive of raw send stream
Currently, the noop receive code fails to work with raw send streams
and resuming send streams. This happens because zfs_receive_impl()
reads the DRR_BEGIN payload without reading the payload itself.
Normally, the kernel expects to read this itself, but in this case
the recv_skip() code runs instead and it is not prepared to handle
the stream being left at any place other than the beginning of a
record.

This patch resolves this issue by manually reading the DRR_BEGIN
payload in the dry-run case. This patch also includes a number of
small fixups in this code path.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #9221
Closes #9173
2019-09-05 16:22:05 -07:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
Makefile.am Include third party licenses in dist tarballs 2019-01-08 09:29:34 -08:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs.pc.in Add libnvpair to libzfs pkg-config 2019-06-22 16:43:11 -07:00
libzfs_changelist.c zfs_handle used after being closed/freed in change_one callback 2019-08-28 15:02:58 -07:00
libzfs_config.c OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a" 2017-02-03 13:24:44 -08:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_crypto.c Fix typos in lib/ 2019-09-02 17:53:27 -07:00
libzfs_dataset.c Fix typos in lib/ 2019-09-02 17:53:27 -07:00
libzfs_diff.c Fix wrong assertion in libzfs diff error handling 2019-05-19 17:31:54 -07:00
libzfs_import.c Improve `zpool labelclear` 2019-03-21 10:13:01 -07:00
libzfs_iter.c Implement Redacted Send/Receive 2019-06-19 09:48:12 -07:00
libzfs_mount.c Fix race in parallel mount's thread dispatching algorithm 2019-07-09 09:31:46 -07:00
libzfs_pool.c Fix typos in lib/ 2019-09-02 17:53:27 -07:00
libzfs_sendrecv.c Fix noop receive of raw send stream 2019-09-05 16:22:05 -07:00
libzfs_status.c Add missing MMP status code to libzfs_status 2019-01-03 12:15:46 -08:00
libzfs_util.c Increase default zcmd allocation to 256K 2019-07-30 09:59:38 -07:00