From 385f9691c46811e5e04626ef879bf7061a4009ed Mon Sep 17 00:00:00 2001 From: DHE Date: Sun, 11 Oct 2015 11:42:42 -0400 Subject: 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 Signed-off-by: Brian Behlendorf Closes #3911 --- lib/libzfs/libzfs_util.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/libzfs') 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)); -- cgit v1.2.3