summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/zfs/spa_misc.c
diff options
context:
space:
mode:
authorAlex Reece <alex@delphix.com>2014-07-18 07:08:31 -0800
committerChristopher Siden <chris@delphix.com>2014-07-18 08:08:31 -0700
commit73527f441cbbd953fa42cc5a30a413bad75f24a9 (patch)
tree830d59a33478dc7b358327222321dba7bc1ccdc4 /usr/src/uts/common/fs/zfs/spa_misc.c
parentbbfa8ea8bb4168c969ba27d632dfe0aeec3fc0da (diff)
downloadillumos-gate-73527f441cbbd953fa42cc5a30a413bad75f24a9.tar.gz
4753 increase number of outstanding async writes when sync task is waiting
Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/fs/zfs/spa_misc.c')
-rw-r--r--usr/src/uts/common/fs/zfs/spa_misc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/spa_misc.c b/usr/src/uts/common/fs/zfs/spa_misc.c
index ff8739e8dd..0504362726 100644
--- a/usr/src/uts/common/fs/zfs/spa_misc.c
+++ b/usr/src/uts/common/fs/zfs/spa_misc.c
@@ -1876,6 +1876,16 @@ spa_writeable(spa_t *spa)
return (!!(spa->spa_mode & FWRITE));
}
+/*
+ * Returns true if there is a pending sync task in any of the current
+ * syncing txg, the current quiescing txg, or the current open txg.
+ */
+boolean_t
+spa_has_pending_synctask(spa_t *spa)
+{
+ return (!txg_all_lists_empty(&spa->spa_dsl_pool->dp_sync_tasks));
+}
+
int
spa_mode(spa_t *spa)
{