Separate warning for incomplete and corrupt streams

This change adds a separate return code to zfs_ioc_recv that is used 
for incomplete streams, in addition to the existing return code for 
streams that contain corruption.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #10122
This commit is contained in:
Paul Dagnelie
2020-03-17 10:30:33 -07:00
committed by GitHub
parent 5b3b79559c
commit 7145123b0a
8 changed files with 24 additions and 11 deletions
@@ -556,7 +556,7 @@ test_recv_new(const char *dataset, int fd)
fnvlist_add_boolean(optional, "resumable");
fnvlist_add_uint64(optional, "action_handle", *action_handle);
#endif
IOC_INPUT_TEST(ZFS_IOC_RECV_NEW, dataset, required, optional, ECKSUM);
IOC_INPUT_TEST(ZFS_IOC_RECV_NEW, dataset, required, optional, ZFS_ERR_STREAM_TRUNCATED);
nvlist_free(props);
nvlist_free(optional);