Use \fB1\fR for yes (default) and \fB0\fR for no.
.RE
+.sp
+.ne 2
+.na
+\fBmetaslabs_per_vdev\fR (int)
+.ad
+.RS 12n
+When a vdev is added, it will be divided into approximately (but no more than) this number of metaslabs.
+.sp
+Default value: \fB200\fR.
+.RE
+
.sp
.ne 2
.na
#include <sys/dsl_scan.h>
#include <sys/zvol.h>
+/*
+ * When a vdev is added, it will be divided into approximately (but no
+ * more than) this number of metaslabs.
+ */
+int metaslabs_per_vdev = 200;
+
/*
* Virtual device management.
*/
vdev_metaslab_set_size(vdev_t *vd)
{
/*
- * Aim for roughly 200 metaslabs per vdev.
+ * Aim for roughly metaslabs_per_vdev (default 200) metaslabs per vdev.
*/
- vd->vdev_ms_shift = highbit64(vd->vdev_asize / 200);
+ vd->vdev_ms_shift = highbit64(vd->vdev_asize / metaslabs_per_vdev);
vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT);
}
EXPORT_SYMBOL(vdev_online);
EXPORT_SYMBOL(vdev_offline);
EXPORT_SYMBOL(vdev_clear);
+
+module_param(metaslabs_per_vdev, int, 0644);
+MODULE_PARM_DESC(metaslabs_per_vdev,
+ "Divide added vdev into approximately (but no more than) this number "
+ "of metaslabs");
#endif