Author: delphij
Date: Sat Oct  4 07:34:50 2014
New Revision: 272496
URL: https://svnweb.freebsd.org/changeset/base/272496

Log:
  5161 add tunable for number of metaslabs per vdev
  Reviewed by: Alex Reece <alex.re...@delphix.com>
  Reviewed by: Christopher Siden <christopher.si...@delphix.com>
  Reviewed by: George Wilson <george.wil...@delphix.com>
  Reviewed by: Paul Dagnelie <paul.dagne...@delphix.com>
  Reviewed by: Saso Kiselkov <skiselkov...@gmail.com>
  Reviewed by: Richard Elling <richard.ell...@gmail.com>
  Approved by: Richard Lowe <richl...@richlowe.net>
  Author:       Matthew Ahrens <mahr...@delphix.com>
  
  illumos/illumos-gate@bf3e216c7efa56332b456f4cf19d208e21d63839

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c    Sat Oct  4 07:32:19 
2014        (r272495)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c    Sat Oct  4 07:34:50 
2014        (r272496)
@@ -65,6 +65,12 @@ static vdev_ops_t *vdev_ops_table[] = {
 int zfs_scrub_limit = 10;
 
 /*
+ * When a vdev is added, it will be divided into approximately (but no
+ * more than) this number of metaslabs.
+ */
+int metaslabs_per_vdev = 200;
+
+/*
  * Given a vdev type, return the appropriate ops vector.
  */
 static vdev_ops_t *
@@ -1551,9 +1557,9 @@ void
 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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to