diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-01-08 15:46:31 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:59 -0400 |
commit | b0331a4c4c339ba7786472b137d6ece9e7f810ec (patch) | |
tree | 6c9727d36f1836304d927014a088e9ec67b40a59 | |
parent | e2008b61401ecb467a8ce1788fcd2116ae1cfbc1 (diff) |
Btrfs: Disable btree reada during extent backref lookups.
This reada is generally not effective.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 68137cd8506a..660b05a4baf5 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -630,6 +630,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, | |||
630 | if (!path) | 630 | if (!path) |
631 | return -ENOMEM; | 631 | return -ENOMEM; |
632 | 632 | ||
633 | path->reada = 0; | ||
633 | key.objectid = bytenr; | 634 | key.objectid = bytenr; |
634 | btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); | 635 | btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); |
635 | key.offset = num_bytes; | 636 | key.offset = num_bytes; |
@@ -649,6 +650,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, | |||
649 | 650 | ||
650 | btrfs_release_path(root->fs_info->extent_root, path); | 651 | btrfs_release_path(root->fs_info->extent_root, path); |
651 | 652 | ||
653 | path->reada = 0; | ||
652 | ret = btrfs_insert_extent_backref(trans, root->fs_info->extent_root, | 654 | ret = btrfs_insert_extent_backref(trans, root->fs_info->extent_root, |
653 | path, bytenr, root_objectid, | 655 | path, bytenr, root_objectid, |
654 | ref_generation, owner, owner_offset); | 656 | ref_generation, owner, owner_offset); |
@@ -680,6 +682,7 @@ static int lookup_extent_ref(struct btrfs_trans_handle *trans, | |||
680 | 682 | ||
681 | WARN_ON(num_bytes < root->sectorsize); | 683 | WARN_ON(num_bytes < root->sectorsize); |
682 | path = btrfs_alloc_path(); | 684 | path = btrfs_alloc_path(); |
685 | path->reada = 0; | ||
683 | key.objectid = bytenr; | 686 | key.objectid = bytenr; |
684 | key.offset = num_bytes; | 687 | key.offset = num_bytes; |
685 | btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); | 688 | btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); |
@@ -1240,6 +1243,7 @@ static int __free_extent(struct btrfs_trans_handle *trans, struct btrfs_root | |||
1240 | if (!path) | 1243 | if (!path) |
1241 | return -ENOMEM; | 1244 | return -ENOMEM; |
1242 | 1245 | ||
1246 | path->reada = 0; | ||
1243 | ret = lookup_extent_backref(trans, extent_root, path, | 1247 | ret = lookup_extent_backref(trans, extent_root, path, |
1244 | bytenr, root_objectid, | 1248 | bytenr, root_objectid, |
1245 | ref_generation, | 1249 | ref_generation, |