@@ -228,7 +228,7 @@ static int csum_tree_block(struct btrfs_fs_info *fs_info,
struct extent_buffer *btrfs_find_tree_block(struct btrfs_fs_info *fs_info,
u64 bytenr, u32 blocksize)
{
- return find_extent_buffer(fs_info, bytenr, blocksize);
+ return find_extent_buffer(fs_info, bytenr);
}
struct extent_buffer* btrfs_find_create_tree_block(
@@ -210,14 +210,15 @@ void free_extent_buffer_stale(struct extent_buffer *eb)
}
struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
- u64 bytenr, u32 blocksize)
+ u64 bytenr)
{
struct extent_buffer *eb = NULL;
struct cache_extent *cache;
- cache = lookup_cache_extent(&fs_info->extent_cache, bytenr, blocksize);
+ cache = lookup_cache_extent(&fs_info->extent_cache, bytenr,
+ fs_info->nodesize);
if (cache && cache->start == bytenr &&
- cache->size == blocksize) {
+ cache->size == fs_info->nodesize) {
eb = container_of(cache, struct extent_buffer, cache_node);
list_move_tail(&eb->lru, &fs_info->lru);
eb->refs++;
@@ -94,7 +94,7 @@ static inline int extent_buffer_uptodate(struct extent_buffer *eb)
}
struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
- u64 bytenr, u32 blocksize);
+ u64 bytenr);
struct extent_buffer *find_first_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start);
struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
In the kernel we only take a bytenr for this as the extent buffer cache is indexed on bytenr. Since we're passing in the btrfs_fs_info we can simply use the ->nodesize for the blocksize, and drop the blocksize argument completely. This brings us into parity with the kernel, which will allow the syncing of ctree.c. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- kernel-shared/disk-io.c | 2 +- kernel-shared/extent_io.c | 7 ++++--- kernel-shared/extent_io.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)