Btrfs: Disable tree defrag in SSD mode
[linux-2.6-block.git] / fs / btrfs / tree-defrag.c
index 5c58630dce03e12800e2c3cf52575d65e8d8c96a..5935cbd8f2b83c7646c17f2823d36746b3151be1 100644 (file)
@@ -179,6 +179,9 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
        if (root->ref_cows == 0 && !is_extent)
                goto out;
 
+       if (btrfs_test_opt(root, SSD))
+               goto out;
+
        path = btrfs_alloc_path();
        if (!path)
                return -ENOMEM;