summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-02-15 23:59:05 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-02-27 13:59:06 -0500
commitbf155f7ca6eda5c7b459389ba72609d625aa27a7 (patch)
tree0ac0123bb1ad02fd171c8a3d660b982ef8e6bb71
parent57e91515970d33787f0a6c98ba563f2b44157147 (diff)
bcachefs: check_path() now only needs to walk up to subvolume root
Now that checking subvolume structure is a separate pass, the main check_directory_connectivity() pass only needs to walk up to a given inode's subvolume root. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/fsck.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index ffb1bafac2a0..144f074bbc6c 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -2250,7 +2250,8 @@ static bool path_is_dup(pathbuf *p, u64 inum, u32 snapshot)
}
/*
- * Check that a given inode is reachable from the root:
+ * Check that a given inode is reachable from its subvolume root - we already
+ * verified subvolume connectivity:
*
* XXX: we should also be verifying that inodes are in the right subvolumes
*/
@@ -2267,8 +2268,7 @@ static int check_path(struct btree_trans *trans, pathbuf *p, struct bkey_s_c ino
BUG_ON(bch2_inode_unpack(inode_k, &inode));
- while (!(inode.bi_inum == BCACHEFS_ROOT_INO &&
- inode.bi_subvol == BCACHEFS_ROOT_SUBVOL)) {
+ while (!inode.bi_subvol) {
struct btree_iter dirent_iter;
struct bkey_s_c_dirent d;
u32 parent_snapshot = snapshot;