summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/fs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-28 16:34:42 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-31 22:03:17 -0400
commitf402d9710b3e55fa2e47a939f69e4267d6d4406f (patch)
tree9849ad6fef7c744a3f7bf7be04493208285e43b2 /fs/bcachefs/fs.c
parentbcachefs: bch2_str_hash_check_key() may now be called without snapshots_seen (diff)
downloadlinux-f402d9710b3e55fa2e47a939f69e4267d6d4406f.tar.gz
linux-f402d9710b3e55fa2e47a939f69e4267d6d4406f.zip
bcachefs: bch2_readdir() now calls str_hash_check_key()
More self healing code: readdir will now notice if there are dirents hashed incorrectly, and it'll repair them if errors=fix_safe. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r--fs/bcachefs/fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index adae43223bce..f52c7db16dec 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1573,11 +1573,12 @@ static int bch2_vfs_readdir(struct file *file, struct dir_context *ctx)
{
struct bch_inode_info *inode = file_bch_inode(file);
struct bch_fs *c = inode->v.i_sb->s_fs_info;
+ struct bch_hash_info hash = bch2_hash_info_init(c, &inode->ei_inode);
if (!dir_emit_dots(file, ctx))
return 0;
- int ret = bch2_readdir(c, inode_inum(inode), ctx);
+ int ret = bch2_readdir(c, inode_inum(inode), &hash, ctx);
bch_err_fn(c, ret);
return bch2_err_class(ret);