MFV r289298: 6286 ZFS internal error when set large block on bootfs

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6de9bb5603
This commit is contained in:
Alexander Motin 2015-10-14 07:50:08 +00:00
commit 95e20e65d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289299

View file

@ -27,7 +27,7 @@
* Copyright 2014 Xin Li <delphij@FreeBSD.org>. All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
*/
@ -3921,7 +3921,7 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
*/
if (zfs_is_bootfs(dsname) &&
intval > SPA_OLD_MAXBLOCKSIZE) {
return (SET_ERROR(EDOM));
return (SET_ERROR(ERANGE));
}
/*
@ -3930,7 +3930,7 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
*/
if (intval > zfs_max_recordsize ||
intval > SPA_MAXBLOCKSIZE)
return (SET_ERROR(EDOM));
return (SET_ERROR(ERANGE));
if ((err = spa_open(dsname, &spa, FTAG)) != 0)
return (err);