mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 17:23:25 -05:00
bcachefs: More informative error message in reattach_inode()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2fa88b1919
commit
7a086baad0
1 changed files with 5 additions and 2 deletions
|
@ -283,6 +283,7 @@ static int reattach_inode(struct btree_trans *trans,
|
||||||
struct bch_inode_unpacked *inode,
|
struct bch_inode_unpacked *inode,
|
||||||
u32 inode_snapshot)
|
u32 inode_snapshot)
|
||||||
{
|
{
|
||||||
|
struct bch_fs *c = trans->c;
|
||||||
struct bch_hash_info dir_hash;
|
struct bch_hash_info dir_hash;
|
||||||
struct bch_inode_unpacked lostfound;
|
struct bch_inode_unpacked lostfound;
|
||||||
char name_buf[20];
|
char name_buf[20];
|
||||||
|
@ -317,7 +318,7 @@ static int reattach_inode(struct btree_trans *trans,
|
||||||
return ret;
|
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);
|
name = (struct qstr) QSTR(name_buf);
|
||||||
|
|
||||||
|
@ -330,8 +331,10 @@ static int reattach_inode(struct btree_trans *trans,
|
||||||
inode->bi_subvol ?: inode->bi_inum,
|
inode->bi_subvol ?: inode->bi_inum,
|
||||||
&dir_offset,
|
&dir_offset,
|
||||||
STR_HASH_must_create);
|
STR_HASH_must_create);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
bch_err_msg(c, ret, "error creating dirent");
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
inode->bi_dir = lostfound.bi_inum;
|
inode->bi_dir = lostfound.bi_inum;
|
||||||
inode->bi_dir_offset = dir_offset;
|
inode->bi_dir_offset = dir_offset;
|
||||||
|
|
Loading…
Add table
Reference in a new issue