diff options
Diffstat (limited to 'module/zfs/zfs_vfsops.c')
-rw-r--r-- | module/zfs/zfs_vfsops.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 59f73776c..e86b21aee 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -188,10 +188,9 @@ static void blksz_changed_cb(void *arg, uint64_t newval) { zfs_sb_t *zsb = arg; - - if (newval < SPA_MINBLOCKSIZE || - newval > SPA_MAXBLOCKSIZE || !ISP2(newval)) - newval = SPA_MAXBLOCKSIZE; + ASSERT3U(newval, <=, spa_maxblocksize(dmu_objset_spa(zsb->z_os))); + ASSERT3U(newval, >=, SPA_MINBLOCKSIZE); + ASSERT(ISP2(newval)); zsb->z_max_blksz = newval; } @@ -672,7 +671,7 @@ zfs_sb_create(const char *osname, zfs_sb_t **zsbp) */ zsb->z_sb = NULL; zsb->z_parent = zsb; - zsb->z_max_blksz = SPA_MAXBLOCKSIZE; + zsb->z_max_blksz = SPA_OLD_MAXBLOCKSIZE; zsb->z_show_ctldir = ZFS_SNAPDIR_VISIBLE; zsb->z_os = os; |