Skip to content

Commit

Permalink
Btrfs: Disable btree reada during extent backref lookups.
Browse files Browse the repository at this point in the history
This reada is generally not effective.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent e2008b6 commit b0331a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
if (!path)
return -ENOMEM;

path->reada = 0;
key.objectid = bytenr;
btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY);
key.offset = num_bytes;
Expand All @@ -649,6 +650,7 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,

btrfs_release_path(root->fs_info->extent_root, path);

path->reada = 0;
ret = btrfs_insert_extent_backref(trans, root->fs_info->extent_root,
path, bytenr, root_objectid,
ref_generation, owner, owner_offset);
Expand Down Expand Up @@ -680,6 +682,7 @@ static int lookup_extent_ref(struct btrfs_trans_handle *trans,

WARN_ON(num_bytes < root->sectorsize);
path = btrfs_alloc_path();
path->reada = 0;
key.objectid = bytenr;
key.offset = num_bytes;
btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY);
Expand Down Expand Up @@ -1240,6 +1243,7 @@ static int __free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
if (!path)
return -ENOMEM;

path->reada = 0;
ret = lookup_extent_backref(trans, extent_root, path,
bytenr, root_objectid,
ref_generation,
Expand Down

0 comments on commit b0331a4

Please sign in to comment.