Skip to content

Commit 7a086ba

Browse files
author
Kent Overstreet
committed
bcachefs: More informative error message in reattach_inode()
Signed-off-by: Kent Overstreet <[email protected]>
1 parent 2fa88b1 commit 7a086ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fs/bcachefs/fsck.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ static int reattach_inode(struct btree_trans *trans,
283283
struct bch_inode_unpacked *inode,
284284
u32 inode_snapshot)
285285
{
286+
struct bch_fs *c = trans->c;
286287
struct bch_hash_info dir_hash;
287288
struct bch_inode_unpacked lostfound;
288289
char name_buf[20];
@@ -317,7 +318,7 @@ static int reattach_inode(struct btree_trans *trans,
317318
return ret;
318319
}
319320

320-
dir_hash = bch2_hash_info_init(trans->c, &lostfound);
321+
dir_hash = bch2_hash_info_init(c, &lostfound);
321322

322323
name = (struct qstr) QSTR(name_buf);
323324

@@ -330,8 +331,10 @@ static int reattach_inode(struct btree_trans *trans,
330331
inode->bi_subvol ?: inode->bi_inum,
331332
&dir_offset,
332333
STR_HASH_must_create);
333-
if (ret)
334+
if (ret) {
335+
bch_err_msg(c, ret, "error creating dirent");
334336
return ret;
337+
}
335338

336339
inode->bi_dir = lostfound.bi_inum;
337340
inode->bi_dir_offset = dir_offset;

0 commit comments

Comments
 (0)