2017-03-16 22:18:50 -08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_FSCK_H
|
|
|
|
#define _BCACHEFS_FSCK_H
|
|
|
|
|
2024-12-04 23:36:33 -05:00
|
|
|
#include "str_hash.h"
|
|
|
|
|
2025-05-28 16:25:11 -04:00
|
|
|
/* recoverds snapshot IDs of overwrites at @pos */
|
|
|
|
struct snapshots_seen {
|
|
|
|
struct bpos pos;
|
|
|
|
snapshot_id_list ids;
|
|
|
|
};
|
|
|
|
|
2024-12-04 23:36:33 -05:00
|
|
|
int bch2_fsck_update_backpointers(struct btree_trans *,
|
|
|
|
struct snapshots_seen *,
|
|
|
|
const struct bch_hash_desc,
|
|
|
|
struct bch_hash_info *,
|
|
|
|
struct bkey_i *);
|
|
|
|
|
2023-07-07 02:42:28 -04:00
|
|
|
int bch2_check_inodes(struct bch_fs *);
|
|
|
|
int bch2_check_extents(struct bch_fs *);
|
2023-10-22 11:33:02 -04:00
|
|
|
int bch2_check_indirect_extents(struct bch_fs *);
|
2023-07-07 02:42:28 -04:00
|
|
|
int bch2_check_dirents(struct bch_fs *);
|
|
|
|
int bch2_check_xattrs(struct bch_fs *);
|
|
|
|
int bch2_check_root(struct bch_fs *);
|
2024-02-15 22:50:42 -05:00
|
|
|
int bch2_check_subvolume_structure(struct bch_fs *);
|
2024-09-29 23:40:28 -04:00
|
|
|
int bch2_check_unreachable_inodes(struct bch_fs *);
|
2023-07-07 02:42:28 -04:00
|
|
|
int bch2_check_directory_structure(struct bch_fs *);
|
|
|
|
int bch2_check_nlinks(struct bch_fs *);
|
|
|
|
int bch2_fix_reflink_p(struct bch_fs *);
|
2017-03-16 22:18:50 -08:00
|
|
|
|
2024-11-06 13:13:25 -05:00
|
|
|
long bch2_ioctl_fsck_offline(struct bch_ioctl_fsck_offline __user *);
|
|
|
|
long bch2_ioctl_fsck_online(struct bch_fs *, struct bch_ioctl_fsck_online);
|
|
|
|
|
2017-03-16 22:18:50 -08:00
|
|
|
#endif /* _BCACHEFS_FSCK_H */
|