From 9a6930e9bedb930ac44e540ef7f5633b61d270c2 Mon Sep 17 00:00:00 2001 From: Yan Zheng Date: Wed, 7 Jan 2009 14:57:12 -0500 Subject: Add semantic checks to btrfsck for files and directories This patch makes btrfsck check more things, including directory items, file extents, checksumming, inode link counts etc. The code for these checks is similar to the code verifies extent back references. The main difference is that shared tree blocks are treated specially. The partial checking results(unresolved references and/or errors) of shared sub-trees are cached. This avoids scanning the shared blocks several times. Thank you, Signed-off-by: Yan Zheng --- ctree.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ctree.h') diff --git a/ctree.h b/ctree.h index 54caa44d..593578f4 100644 --- a/ctree.h +++ b/ctree.h @@ -1528,6 +1528,9 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans, u64 root_objectid, u64 ref_generation, u64 owner, u64 empty_size, u64 hint_byte, u64 search_end, struct btrfs_key *ins, int data); +int btrfs_lookup_extent_ref(struct btrfs_trans_handle *trans, + struct btrfs_root *root, u64 bytenr, + u64 num_bytes, u32 *refs); int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *orig_buf, struct extent_buffer *buf, u32 *nr_extents); -- cgit v1.2.3