Skip to content

Commit c769be2

Browse files
fdmananakdave
authored andcommitted
btrfs: include root in error message when unlinking inode
To help debugging include the root number in the error message, and since this is a critical error that implies a metadata inconsistency and results in a transaction abort change the log message level from "info" to "critical", which is a much better fit. Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 4db7384 commit c769be2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/btrfs/inode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4250,9 +4250,9 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
42504250

42514251
ret = btrfs_del_inode_ref(trans, root, name, ino, dir_ino, &index);
42524252
if (ret) {
4253-
btrfs_info(fs_info,
4254-
"failed to delete reference to %.*s, inode %llu parent %llu",
4255-
name->len, name->name, ino, dir_ino);
4253+
btrfs_crit(fs_info,
4254+
"failed to delete reference to %.*s, root %llu inode %llu parent %llu",
4255+
name->len, name->name, btrfs_root_id(root), ino, dir_ino);
42564256
btrfs_abort_transaction(trans, ret);
42574257
goto err;
42584258
}

0 commit comments

Comments
 (0)