Skip to content

Commit 8d6ac82

Browse files
author
Kent Overstreet
committed
bcachefs: fsck: additional diagnostics for reattach_inode()
Log the inode's new path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 3e5ceaa commit 8d6ac82

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

fs/bcachefs/fsck.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ static int reattach_inode(struct btree_trans *trans, struct bch_inode_unpacked *
399399
if (ret)
400400
return ret;
401401

402+
bch_verbose(c, "got lostfound inum %llu", lostfound.bi_inum);
403+
402404
lostfound.bi_nlink += S_ISDIR(inode->bi_mode);
403405

404406
/* ensure lost+found inode is also present in inode snapshot */
@@ -435,6 +437,16 @@ static int reattach_inode(struct btree_trans *trans, struct bch_inode_unpacked *
435437
if (ret)
436438
return ret;
437439

440+
{
441+
CLASS(printbuf, buf)();
442+
ret = bch2_inum_snapshot_to_path(trans, inode->bi_inum,
443+
inode->bi_snapshot, NULL, &buf);
444+
if (ret)
445+
return ret;
446+
447+
bch_info(c, "reattached at %s", buf.buf);
448+
}
449+
438450
/*
439451
* Fix up inodes in child snapshots: if they should also be reattached
440452
* update the backpointer field, if they should not be we need to emit

0 commit comments

Comments
 (0)