mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Relax special_small_blocks restrictions
special_small_blocks is applied to blocks after compression, so it makes no sense to demand its values to be power of 2. At most they could be multiple of 512, but that would still buy us nothing, so lets allow them be any within SPA_MAXBLOCKSIZE. Also special_small_blocks does not really need to depend on the set recordsize, enabled pool features or presence of special vdev. At worst in any of those cases it will just do nothing, so we should not complicate users lives by artificial limitations. While there, polish comments for recordsize and volblocksize. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #17497
This commit is contained in:
@@ -345,12 +345,6 @@ smallblk_changed_cb(void *arg, uint64_t newval)
|
||||
{
|
||||
objset_t *os = arg;
|
||||
|
||||
/*
|
||||
* Inheritance and range checking should have been done by now.
|
||||
*/
|
||||
ASSERT(newval <= SPA_MAXBLOCKSIZE);
|
||||
ASSERT(ISP2(newval));
|
||||
|
||||
os->os_zpl_special_smallblock = newval;
|
||||
}
|
||||
|
||||
|
||||
@@ -5000,15 +5000,6 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
|
||||
}
|
||||
break;
|
||||
|
||||
case ZFS_PROP_SPECIAL_SMALL_BLOCKS:
|
||||
/*
|
||||
* This property could require the allocation classes
|
||||
* feature to be active for setting, however we allow
|
||||
* it so that tests of settable properties succeed.
|
||||
* The CLI will issue a warning in this case.
|
||||
*/
|
||||
break;
|
||||
|
||||
case ZFS_PROP_SHARESMB:
|
||||
if (zpl_earlier_version(dsname, ZPL_VERSION_FUID))
|
||||
return (SET_ERROR(ENOTSUP));
|
||||
|
||||
Reference in New Issue
Block a user