diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-01-28 20:29:43 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-01-28 20:29:43 -0500 |
commit | e4f722fa42537bcb0ff14322a57dc3870d093cab (patch) | |
tree | 315920ade3b68bf20c4080bcd1bf2bc34a5d5ab7 /fs/btrfs/ctree.c | |
parent | 18e352e4a73465349711a9324767e1b2453383e2 (diff) | |
parent | a717531942f488209dded30f6bc648167bcefa72 (diff) | |
download | talos-obmc-linux-e4f722fa42537bcb0ff14322a57dc3870d093cab.tar.gz talos-obmc-linux-e4f722fa42537bcb0ff14322a57dc3870d093cab.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Fix fs/btrfs/super.c conflict around #includes
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 9e46c0776816..2603ee539b7a 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1210,8 +1210,7 @@ static noinline void reada_for_search(struct btrfs_root *root, struct btrfs_disk_key disk_key; u32 nritems; u64 search; - u64 lowest_read; - u64 highest_read; + u64 target; u64 nread = 0; int direction = path->reada; struct extent_buffer *eb; @@ -1235,8 +1234,7 @@ static noinline void reada_for_search(struct btrfs_root *root, return; } - highest_read = search; - lowest_read = search; + target = search; nritems = btrfs_header_nritems(node); nr = slot; @@ -1256,24 +1254,15 @@ static noinline void reada_for_search(struct btrfs_root *root, break; } search = btrfs_node_blockptr(node, nr); - if ((search >= lowest_read && search <= highest_read) || - (search < lowest_read && lowest_read - search <= 16384) || - (search > highest_read && search - highest_read <= 16384)) { + if ((search <= target && target - search <= 65536) || + (search > target && search - target <= 65536)) { readahead_tree_block(root, search, blocksize, btrfs_node_ptr_generation(node, nr)); nread += blocksize; } nscan++; - if (path->reada < 2 && (nread > (64 * 1024) || nscan > 32)) + if ((nread > 65536 || nscan > 32)) break; - - if (nread > (256 * 1024) || nscan > 128) - break; - - if (search < lowest_read) - lowest_read = search; - if (search > highest_read) - highest_read = search; } } |