summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-02-12 15:41:38 +0100
committerChris Mason <chris.mason@oracle.com>2009-02-12 15:41:38 +0100
commit536ac8ae86e68bb5574d7cc81c7d229a86b82601 (patch)
tree2ec565edbbe3cf91e864b83f3fbd0a5bf8c088c4 /fs/btrfs/extent-tree.c
parentBtrfs: process mount options on mount -o remount, (diff)
downloadlinux-536ac8ae86e68bb5574d7cc81c7d229a86b82601.tar.xz
linux-536ac8ae86e68bb5574d7cc81c7d229a86b82601.zip
Btrfs: use larger metadata clusters in ssd mode
Larger metadata clusters can significantly improve writeback performance on ssd drives with large erasure blocks. The larger clusters make it more likely a given IO will completely overwrite the ssd block, so it doesn't have to do an internal rwm cycle. On spinning media, lager metadata clusters end up spreading out the metadata more over time, which makes fsck slower, so we don't want this to be the default. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/extent-tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 376656f65b33..c59e12036e20 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2872,7 +2872,8 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
if (data & BTRFS_BLOCK_GROUP_METADATA) {
last_ptr = &root->fs_info->last_alloc;
- empty_cluster = 64 * 1024;
+ if (!btrfs_test_opt(root, SSD))
+ empty_cluster = 64 * 1024;
}
if ((data & BTRFS_BLOCK_GROUP_DATA) && btrfs_test_opt(root, SSD))