|
@@ -1683,7 +1683,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
- cur = btrfs_find_tree_block(root, blocknr, blocksize);
|
|
|
|
|
|
+ cur = btrfs_find_tree_block(root, blocknr);
|
|
if (cur)
|
|
if (cur)
|
|
uptodate = btrfs_buffer_uptodate(cur, gen, 0);
|
|
uptodate = btrfs_buffer_uptodate(cur, gen, 0);
|
|
else
|
|
else
|
|
@@ -2264,7 +2264,7 @@ static void reada_for_search(struct btrfs_root *root,
|
|
|
|
|
|
search = btrfs_node_blockptr(node, slot);
|
|
search = btrfs_node_blockptr(node, slot);
|
|
blocksize = root->nodesize;
|
|
blocksize = root->nodesize;
|
|
- eb = btrfs_find_tree_block(root, search, blocksize);
|
|
|
|
|
|
+ eb = btrfs_find_tree_block(root, search);
|
|
if (eb) {
|
|
if (eb) {
|
|
free_extent_buffer(eb);
|
|
free_extent_buffer(eb);
|
|
return;
|
|
return;
|
|
@@ -2326,7 +2326,7 @@ static noinline void reada_for_balance(struct btrfs_root *root,
|
|
if (slot > 0) {
|
|
if (slot > 0) {
|
|
block1 = btrfs_node_blockptr(parent, slot - 1);
|
|
block1 = btrfs_node_blockptr(parent, slot - 1);
|
|
gen = btrfs_node_ptr_generation(parent, slot - 1);
|
|
gen = btrfs_node_ptr_generation(parent, slot - 1);
|
|
- eb = btrfs_find_tree_block(root, block1, blocksize);
|
|
|
|
|
|
+ eb = btrfs_find_tree_block(root, block1);
|
|
/*
|
|
/*
|
|
* if we get -eagain from btrfs_buffer_uptodate, we
|
|
* if we get -eagain from btrfs_buffer_uptodate, we
|
|
* don't want to return eagain here. That will loop
|
|
* don't want to return eagain here. That will loop
|
|
@@ -2339,7 +2339,7 @@ static noinline void reada_for_balance(struct btrfs_root *root,
|
|
if (slot + 1 < nritems) {
|
|
if (slot + 1 < nritems) {
|
|
block2 = btrfs_node_blockptr(parent, slot + 1);
|
|
block2 = btrfs_node_blockptr(parent, slot + 1);
|
|
gen = btrfs_node_ptr_generation(parent, slot + 1);
|
|
gen = btrfs_node_ptr_generation(parent, slot + 1);
|
|
- eb = btrfs_find_tree_block(root, block2, blocksize);
|
|
|
|
|
|
+ eb = btrfs_find_tree_block(root, block2);
|
|
if (eb && btrfs_buffer_uptodate(eb, gen, 1) != 0)
|
|
if (eb && btrfs_buffer_uptodate(eb, gen, 1) != 0)
|
|
block2 = 0;
|
|
block2 = 0;
|
|
free_extent_buffer(eb);
|
|
free_extent_buffer(eb);
|
|
@@ -2450,16 +2450,14 @@ read_block_for_search(struct btrfs_trans_handle *trans,
|
|
{
|
|
{
|
|
u64 blocknr;
|
|
u64 blocknr;
|
|
u64 gen;
|
|
u64 gen;
|
|
- u32 blocksize;
|
|
|
|
struct extent_buffer *b = *eb_ret;
|
|
struct extent_buffer *b = *eb_ret;
|
|
struct extent_buffer *tmp;
|
|
struct extent_buffer *tmp;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
blocknr = btrfs_node_blockptr(b, slot);
|
|
blocknr = btrfs_node_blockptr(b, slot);
|
|
gen = btrfs_node_ptr_generation(b, slot);
|
|
gen = btrfs_node_ptr_generation(b, slot);
|
|
- blocksize = root->nodesize;
|
|
|
|
|
|
|
|
- tmp = btrfs_find_tree_block(root, blocknr, blocksize);
|
|
|
|
|
|
+ tmp = btrfs_find_tree_block(root, blocknr);
|
|
if (tmp) {
|
|
if (tmp) {
|
|
/* first we do an atomic uptodate check */
|
|
/* first we do an atomic uptodate check */
|
|
if (btrfs_buffer_uptodate(tmp, gen, 1) > 0) {
|
|
if (btrfs_buffer_uptodate(tmp, gen, 1) > 0) {
|