@@ -664,7 +664,10 @@ static int traverse_tree_blocks(struct extent_buffer *eb, int tree_root, int pin
if (ret)
return ret;
} else {
+ u64 end;
+
bytenr = btrfs_node_blockptr(eb, i);
+ end = bytenr + gfs_info->nodesize - 1;
/* If we aren't the tree root don't read the block */
if (level == 1 && !tree_root) {
@@ -672,8 +675,7 @@ static int traverse_tree_blocks(struct extent_buffer *eb, int tree_root, int pin
btrfs_pin_extent(gfs_info, bytenr,
gfs_info->nodesize);
else
- set_extent_dirty(tree, bytenr,
- gfs_info->nodesize);
+ set_extent_dirty(tree, bytenr, end);
continue;
}
I screwed up a fix where we're setting the bytenr range as dirty when marking all tree blocks used, I was looking at btrfs_pin_extent and put ->nodesize for end instead of the actual end, which is bytenr + ->nodesize - 1. Fix this up so it's correct. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- check/mode-common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)