From owner-svn-src-all@FreeBSD.ORG Sat Oct 4 07:34:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 039617E7; Sat, 4 Oct 2014 07:34:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E37ADDCE; Sat, 4 Oct 2014 07:34:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s947YoUg084135; Sat, 4 Oct 2014 07:34:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s947YoiV084134; Sat, 4 Oct 2014 07:34:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040734.s947YoiV084134@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 07:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r272496 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 07:34:51 -0000 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 Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Paul Dagnelie Reviewed by: Saso Kiselkov Reviewed by: Richard Elling Approved by: Richard Lowe Author: Matthew Ahrens 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); }