[PATCH v2 01/13] btrfs-progs: check: fix set_extent_dirty range
From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-11-10 20:08:10
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-11-10 20:08:10
Subsystem:
the rest · Maintainer:
Linus Torvalds
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(-)
diff --git a/check/mode-common.c b/check/mode-common.c
index 0059672c..02807101 100644
--- a/check/mode-common.c
+++ b/check/mode-common.c@@ -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; }
--
2.26.3