Skip to content

Commit 016c4b4

Browse files
author
Kent Overstreet
committed
bcachefs: Fix endianness in casefold check/repair
Fixes: 010c894 ("bcachefs: Check for casefolded dirents in non casefolded dirs") Signed-off-by: Kent Overstreet <[email protected]>
1 parent b41ac97 commit 016c4b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fs/bcachefs/fsck.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,11 +2204,11 @@ static int check_dirent(struct btree_trans *trans, struct btree_iter *iter,
22042204
buf.buf))) {
22052205
struct qstr name = bch2_dirent_get_name(d);
22062206
u32 subvol = d.v->d_type == DT_SUBVOL
2207-
? d.v->d_parent_subvol
2207+
? le32_to_cpu(d.v->d_parent_subvol)
22082208
: 0;
22092209
u64 target = d.v->d_type == DT_SUBVOL
2210-
? d.v->d_child_subvol
2211-
: d.v->d_inum;
2210+
? le32_to_cpu(d.v->d_child_subvol)
2211+
: le64_to_cpu(d.v->d_inum);
22122212
u64 dir_offset;
22132213

22142214
ret = bch2_hash_delete_at(trans,

fs/bcachefs/sb-errors_format.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ enum bch_fsck_flags {
209209
x(subvol_to_missing_root, 188, 0) \
210210
x(subvol_root_wrong_bi_subvol, 189, FSCK_AUTOFIX) \
211211
x(bkey_in_missing_snapshot, 190, 0) \
212-
x(bkey_in_deleted_snapshot, 315, 0) \
212+
x(bkey_in_deleted_snapshot, 315, FSCK_AUTOFIX) \
213213
x(inode_pos_inode_nonzero, 191, 0) \
214214
x(inode_pos_blockdev_range, 192, 0) \
215215
x(inode_alloc_cursor_inode_bad, 301, 0) \

0 commit comments

Comments
 (0)