path: root/extent_io.c
diff options
authorOmar Sandoval <>2015-09-29 20:51:45 -0700
committerDavid Sterba <>2016-01-12 15:02:54 +0100
commite4797df6a9fac329fdb168f8fd6bf1925ead3c28 (patch)
treeb654c6f772fa2506638c8a3d3dae0a5bbe32d6a1 /extent_io.c
parentd8c537e71f3dce8a8d03dddfcbcac71ef2e2cdc4 (diff)
btrfs-progs: check the free space tree in btrfsck
This reuses the existing code for checking the free space cache, we just need to load the free space tree. While we do that, we check a couple of invariants on the free space tree itself. This requires pulling in some code from the kernel to exclude the super stripes. Signed-off-by: Omar Sandoval <> Signed-off-by: David Sterba <>
Diffstat (limited to 'extent_io.c')
1 files changed, 6 insertions, 0 deletions
diff --git a/extent_io.c b/extent_io.c
index 75496ce9..88e92736 100644
--- a/extent_io.c
+++ b/extent_io.c
@@ -884,3 +884,9 @@ void memset_extent_buffer(struct extent_buffer *eb, char c,
memset(eb->data + start, c, len);
+int extent_buffer_test_bit(struct extent_buffer *eb, unsigned long start,
+ unsigned long nr)
+ return test_bit(nr, (unsigned long *)(eb->data + start));