Btrfs: don't wait around for new log writers on an SSD
authorChris Mason <chris.mason@fusionio.com>
Mon, 23 Jul 2012 19:23:45 +0000 (15:23 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 23 Jul 2012 19:36:17 +0000 (15:36 -0400)
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>
fs/btrfs/transaction.c

index b72b068183ec6bb334a1cb9088ffa02d7eb13029..8c35847d0feeb4bda1b37efaef67c06c6e0c2b78 100644 (file)
@@ -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 {