diff options
author | Allan Jude <[email protected]> | 2020-08-01 11:41:31 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-01 08:41:31 -0700 |
commit | 8fb79fdddb076036a006e19f4e1b93b3baf72498 (patch) | |
tree | 9327b9f3a9b6dd1efb12778e74de7a34567f1856 /include/sys | |
parent | 47ed79ff60945e0c5d8ccb56f0d29a893e1261ac (diff) |
Change the error handling for invalid property values
ZFS recv should return a useful error message when an invalid index
property value is provided in the send stream properties nvlist
With a compression= property outside of the understood range:
Before:
```
receiving full stream of zof/zstd_send@send2 into testpool/recv@send2
internal error: Invalid argument
Aborted (core dumped)
```
Note: the recv completes successfully, the abort() is likely just to
make it easier to track the unexpected error code.
After:
```
receiving full stream of zof/zstd_send@send2 into testpool/recv@send2
cannot receive compression property on testpool/recv: invalid property
value received 28.9M stream in 1 seconds (28.9M/sec)
```
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Allan Jude <[email protected]>
Closes #10631
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/fs/zfs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index ef87c24a4..8126832ba 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -1366,6 +1366,7 @@ typedef enum { ZFS_ERR_STREAM_LARGE_BLOCK_MISMATCH, ZFS_ERR_RESILVER_IN_PROGRESS, ZFS_ERR_REBUILD_IN_PROGRESS, + ZFS_ERR_BADPROP, } zfs_errno_t; /* |