summaryrefslogtreecommitdiffstats
path: root/include/sys/spa.h
diff options
context:
space:
mode:
authorGeorge Wilson <[email protected]>2011-07-26 12:08:52 -0700
committerBrian Behlendorf <[email protected]>2011-08-01 12:09:11 -0700
commit6d974228ef05366c546bb04198dafcb38785c16d (patch)
tree0b5133bcfd94f7165d941f1ed0e461e30adb0e64 /include/sys/spa.h
parentbb939d10859e4f56bc793c4d5077e680a8c6c3aa (diff)
Illumos #1051: zfs should handle imbalanced luns
Today zfs tries to allocate blocks evenly across all devices. This means when devices are imbalanced zfs will use lots of CPU searching for space on devices which tend to be pretty full. It should instead fail quickly on the full LUNs and move onto devices which have more availability. Reviewed by: Eric Schrock <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Adam Leventhal <[email protected]> Reviewed by: Albert Lee <[email protected]> Reviewed by: Gordon Ross <[email protected]> Approved by: Garrett D'Amore <[email protected]> References to Illumos issue and patch: - https://www.illumos.org/issues/510 - https://github.com/illumos/illumos-gate/commit/5ead3ed965 Signed-off-by: Brian Behlendorf <[email protected]> Issue #340
Diffstat (limited to 'include/sys/spa.h')
-rw-r--r--include/sys/spa.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sys/spa.h b/include/sys/spa.h
index 52737ebc2..c9028fb09 100644
--- a/include/sys/spa.h
+++ b/include/sys/spa.h
@@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
*/
#ifndef _SYS_SPA_H
@@ -698,6 +699,13 @@ _NOTE(CONSTCOND) } while (0)
#define dprintf_bp(bp, fmt, ...)
#endif
+extern boolean_t spa_debug_enabled(spa_t *spa);
+#define spa_dbgmsg(spa, ...) \
+{ \
+ if (spa_debug_enabled(spa)) \
+ zfs_dbgmsg(__VA_ARGS__); \
+}
+
extern int spa_mode_global; /* mode, e.g. FREAD | FWRITE */
#ifdef __cplusplus