diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-20 20:37:24 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-22 17:27:15 +0200 |
commit | 7a086baad0d640a45dbc65d6853a58ca6368892b (patch) | |
tree | a39ccc8332568bad8759a1eccce8c49fddd1a5d4 /fs/bcachefs/fsck.c | |
parent | bcachefs: kill btree_trans_too_many_iters() in bch2_bucket_alloc_freelist() (diff) | |
download | linux-7a086baad0d640a45dbc65d6853a58ca6368892b.tar.xz linux-7a086baad0d640a45dbc65d6853a58ca6368892b.zip |
bcachefs: More informative error message in reattach_inode()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/fsck.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index cc4f0963c0c5..9138944c5ae6 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -283,6 +283,7 @@ static int reattach_inode(struct btree_trans *trans, struct bch_inode_unpacked *inode, u32 inode_snapshot) { + struct bch_fs *c = trans->c; struct bch_hash_info dir_hash; struct bch_inode_unpacked lostfound; char name_buf[20]; @@ -317,7 +318,7 @@ static int reattach_inode(struct btree_trans *trans, return ret; } - dir_hash = bch2_hash_info_init(trans->c, &lostfound); + dir_hash = bch2_hash_info_init(c, &lostfound); name = (struct qstr) QSTR(name_buf); @@ -330,8 +331,10 @@ static int reattach_inode(struct btree_trans *trans, inode->bi_subvol ?: inode->bi_inum, &dir_offset, STR_HASH_must_create); - if (ret) + if (ret) { + bch_err_msg(c, ret, "error creating dirent"); return ret; + } inode->bi_dir = lostfound.bi_inum; inode->bi_dir_offset = dir_offset; |