From 78701de4b75738036124ea6ce68a3da9cdf6f632 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sat, 18 Oct 2014 22:11:10 +0000 Subject: [PATCH] Add tunable vfs.zfs.space_map_blksz for space map's maximum block size. MFC after: 2 weeks --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c index 94790b9eaee5..aeac124df40d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c @@ -37,6 +37,8 @@ #include #include +SYSCTL_DECL(_vfs_zfs); + /* * The data for a given space map can be kept on blocks of any size. * Larger blocks entail fewer i/o operations, but they also cause the @@ -44,6 +46,8 @@ * when only a few blocks have changed since the last transaction group. */ int space_map_blksz = (1 << 12); +SYSCTL_INT(_vfs_zfs, OID_AUTO, space_map_blksz, CTLFLAG_RDTUN, &space_map_blksz, 0, + "Maximum block size for space map. Must be power of 2 and greater than 4096."); /* * Load the space map disk into the specified range tree. Segments of maptype