diff options
author | delphij <delphij@FreeBSD.org> | 2014-08-02 04:01:44 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-08-02 04:01:44 +0000 |
commit | 2f2875361e19bf1fdf4fde5c8e1763dcc4190620 (patch) | |
tree | 6ad33d201a6ec72b3227e7189157d71363c85e0c /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c | |
parent | b798cd9bfe5eed52bd7d48badb239999a0d81389 (diff) | |
download | FreeBSD-src-2f2875361e19bf1fdf4fde5c8e1763dcc4190620.zip FreeBSD-src-2f2875361e19bf1fdf4fde5c8e1763dcc4190620.tar.gz |
MFC r268859: MFV r268851:
When a sync task is waiting for a txg to complete, we should hurry it along
by increasing the number of outstanding async writes (i.e. make
vdev_queue_max_async_writes() return a larger number).
Illumos issue:
4753 increase number of outstanding async writes when sync task is waiting
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c index d09fb5b..21904490 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c @@ -1938,6 +1938,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) { |