Skip to content

Commit 51b7cc7

Browse files
author
Kent Overstreet
committed
bcachefs: Improve bch2_is_inode_open() warning message
Signed-off-by: Kent Overstreet <[email protected]>
1 parent 4a8f8fa commit 51b7cc7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/bcachefs/fsck.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ static int check_inode_dirent_inode(struct btree_trans *trans, struct bkey_s_c i
963963
return ret;
964964
}
965965

966-
static bool bch2_inode_open(struct bch_fs *c, struct bpos p)
966+
static bool bch2_inode_is_open(struct bch_fs *c, struct bpos p)
967967
{
968968
subvol_inum inum = {
969969
.subvol = snapshot_t(c, p.snapshot)->subvol,
@@ -972,7 +972,7 @@ static bool bch2_inode_open(struct bch_fs *c, struct bpos p)
972972

973973
/* snapshot tree corruption, can't safely delete */
974974
if (!inum.subvol) {
975-
bch_err_ratelimited(c, "%s(): snapshot %u has no subvol", __func__, p.snapshot);
975+
bch_warn_ratelimited(c, "%s(): snapshot %u has no subvol, unlinked but can't safely delete", __func__, p.snapshot);
976976
return true;
977977
}
978978

@@ -1057,7 +1057,7 @@ static int check_inode(struct btree_trans *trans,
10571057
}
10581058

10591059
if (u.bi_flags & BCH_INODE_unlinked &&
1060-
!bch2_inode_open(c, k.k->p) &&
1060+
!bch2_inode_is_open(c, k.k->p) &&
10611061
(!c->sb.clean ||
10621062
fsck_err(trans, inode_unlinked_but_clean,
10631063
"filesystem marked clean, but inode %llu unlinked",

0 commit comments

Comments
 (0)