summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDHE <[email protected]>2015-10-11 11:42:42 -0400
committerBrian Behlendorf <[email protected]>2015-10-13 09:54:04 -0700
commit385f9691c46811e5e04626ef879bf7061a4009ed (patch)
tree1156d3bac19c18e13c1f074dc5812dfa0bbc61b7 /lib
parent935434ef01fc067f3b4bc26be6378f8f1d89734a (diff)
libzfs: handle EDOM errors
EDOM may occur if a user tries to set `recordsize` too large without use "zfs set". This can be demonstrated with: > zpool create testpool -O recordsize=32M /dev/... Signed-off-by: DHE <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3911
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index 678eeadc0..1e7bfb2ad 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -500,6 +500,11 @@ zpool_standard_error_fmt(libzfs_handle_t *hdl, int error, const char *fmt, ...)
case EROFS:
zfs_verror(hdl, EZFS_POOLREADONLY, fmt, ap);
break;
+ case EDOM:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "block size out of range or does not match"));
+ zfs_verror(hdl, EZFS_BADPROP, fmt, ap);
+ break;
default:
zfs_error_aux(hdl, strerror(error));