summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2013-02-06 08:29:00 +0000
committermm <mm@FreeBSD.org>2013-02-06 08:29:00 +0000
commit7898655cb728e5ea7dd92f166ccd00463319ed1d (patch)
tree4db8bea0b8335850f74e1f5b6f22b967bb5b53e1
parent78c7f6de8720de1f612bdc626f6be3f27a6f2aae (diff)
downloadFreeBSD-src-7898655cb728e5ea7dd92f166ccd00463319ed1d.zip
FreeBSD-src-7898655cb728e5ea7dd92f166ccd00463319ed1d.tar.gz
Update vendor-sys/illumos/dist to illumos-gate version 13945:7a9c1d41dfbe
Illumos ZFS issues: 3507 Tunable to allow block allocation even on degraded vdevs
-rw-r--r--uts/common/fs/zfs/metaslab.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/uts/common/fs/zfs/metaslab.c b/uts/common/fs/zfs/metaslab.c
index 6449788..ceb7c6f 100644
--- a/uts/common/fs/zfs/metaslab.c
+++ b/uts/common/fs/zfs/metaslab.c
@@ -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 <sys/zfs_context.h>
@@ -91,6 +92,11 @@ int metaslab_prefetch_limit = SPA_DVAS_PER_BP;
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;
}
OpenPOWER on IntegriCloud