1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _BCACHEFS_FSCK_H 3 #define _BCACHEFS_FSCK_H 4 5 #include "str_hash.h" 6 7 /* recoverds snapshot IDs of overwrites at @pos */ 8 struct snapshots_seen { 9 struct bpos pos; 10 snapshot_id_list ids; 11 }; 12 13 int bch2_fsck_update_backpointers(struct btree_trans *, 14 struct snapshots_seen *, 15 const struct bch_hash_desc, 16 struct bch_hash_info *, 17 struct bkey_i *); 18 19 int bch2_check_inodes(struct bch_fs *); 20 int bch2_check_extents(struct bch_fs *); 21 int bch2_check_indirect_extents(struct bch_fs *); 22 int bch2_check_dirents(struct bch_fs *); 23 int bch2_check_xattrs(struct bch_fs *); 24 int bch2_check_root(struct bch_fs *); 25 int bch2_check_subvolume_structure(struct bch_fs *); 26 int bch2_check_unreachable_inodes(struct bch_fs *); 27 int bch2_check_directory_structure(struct bch_fs *); 28 int bch2_check_nlinks(struct bch_fs *); 29 int bch2_fix_reflink_p(struct bch_fs *); 30 31 long bch2_ioctl_fsck_offline(struct bch_ioctl_fsck_offline __user *); 32 long bch2_ioctl_fsck_online(struct bch_fs *, struct bch_ioctl_fsck_online); 33 34 #endif /* _BCACHEFS_FSCK_H */ 35