mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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:
@@ -1265,10 +1265,11 @@ receive_read(dmu_recv_cookie_t *drc, int len, void *buf)
|
||||
len - done, &resid);
|
||||
if (resid == len - done) {
|
||||
/*
|
||||
* Note: ECKSUM indicates that the receive
|
||||
* was interrupted and can potentially be resumed.
|
||||
* Note: ECKSUM or ZFS_ERR_STREAM_TRUNCATED indicates
|
||||
* that the receive was interrupted and can
|
||||
* potentially be resumed.
|
||||
*/
|
||||
drc->drc_err = SET_ERROR(ECKSUM);
|
||||
drc->drc_err = SET_ERROR(ZFS_ERR_STREAM_TRUNCATED);
|
||||
}
|
||||
drc->drc_voff += len - done - resid;
|
||||
done = len - resid;
|
||||
|
||||
Reference in New Issue
Block a user