diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-02-15 13:19:35 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:00 -0400 |
commit | 9afbb0b752ef30a429c45b9de6706e28ad1a36e1 (patch) | |
tree | 2e1d749ced02b62282fe899237c7595ebb6add63 /fs/btrfs/tree-defrag.c | |
parent | df68b8a7ad4a18c9e63f1c12015a59c3b7031adb (diff) | |
download | linux-stable-9afbb0b752ef30a429c45b9de6706e28ad1a36e1.tar.gz linux-stable-9afbb0b752ef30a429c45b9de6706e28ad1a36e1.tar.bz2 linux-stable-9afbb0b752ef30a429c45b9de6706e28ad1a36e1.zip |
Btrfs: Disable tree defrag in SSD mode
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
-rw-r--r-- | fs/btrfs/tree-defrag.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c index 5c58630dce03..5935cbd8f2b8 100644 --- a/fs/btrfs/tree-defrag.c +++ b/fs/btrfs/tree-defrag.c @@ -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; |