summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mason <chris.mason@fusionio.com>2012-07-23 23:23:45 +0400
committerChris Mason <chris.mason@fusionio.com>2012-07-23 23:36:17 +0400
commite39e64ac0cdeca3798a6bf186f873be20e2f57b4 (patch)
treef0f7468b17124e92d120b3696b9a5896cdc3cb04
parent28a33cbc24e4256c143dce96c7d93bf423229f92 (diff)
downloadlinux-e39e64ac0cdeca3798a6bf186f873be20e2f57b4.tar.xz
Btrfs: don't wait around for new log writers on an SSD
Waiting on spindles improves performance, but ssds want all the IO as quickly as we can push it down. Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r--fs/btrfs/transaction.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index b72b068183ec..8c35847d0fee 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1330,7 +1330,8 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
spin_unlock(&root->fs_info->trans_lock);
}
- if (now < cur_trans->start_time || now - cur_trans->start_time < 1)
+ if (!btrfs_test_opt(root, SSD) &&
+ (now < cur_trans->start_time || now - cur_trans->start_time < 1))
should_grow = 1;
do {