From owner-svn-src-vendor@FreeBSD.ORG Wed Feb 6 08:29:01 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 10921A22; Wed, 6 Feb 2013 08:29:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0320F7BD; Wed, 6 Feb 2013 08:29:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r168T0ul042648; Wed, 6 Feb 2013 08:29:00 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r168T0kB042647; Wed, 6 Feb 2013 08:29:00 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201302060829.r168T0kB042647@svn.freebsd.org> From: Martin Matuska Date: Wed, 6 Feb 2013 08:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r246394 - 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-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 08:29:01 -0000 Author: mm Date: Wed Feb 6 08:29:00 2013 New Revision: 246394 URL: http://svnweb.freebsd.org/changeset/base/246394 Log: Update vendor-sys/illumos/dist to illumos-gate version 13945:7a9c1d41dfbe Illumos ZFS issues: 3507 Tunable to allow block allocation even on degraded vdevs Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Wed Feb 6 08:26:55 2013 (r246393) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Wed Feb 6 08:29:00 2013 (r246394) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #include @@ -91,6 +92,11 @@ int metaslab_prefetch_limit = SPA_DVAS_P int metaslab_smo_bonus_pct = 150; /* + * Should we be willing to write data to degraded vdevs? + */ +boolean_t zfs_write_to_degraded = B_FALSE; + +/* * ========================================================================== * Metaslab classes * ========================================================================== @@ -1377,10 +1383,13 @@ top: /* * Avoid writing single-copy data to a failing vdev + * unless the user instructs us that it is okay. */ if ((vd->vdev_stat.vs_write_errors > 0 || vd->vdev_state < VDEV_STATE_HEALTHY) && - d == 0 && dshift == 3) { + d == 0 && dshift == 3 && + !(zfs_write_to_degraded && vd->vdev_state == + VDEV_STATE_DEGRADED)) { all_zero = B_FALSE; goto next; }