mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
bcachefs: Improve bch2_is_inode_open() warning message
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
4a8f8fafbd
commit
51b7cc7c0f
@ -963,7 +963,7 @@ static int check_inode_dirent_inode(struct btree_trans *trans, struct bkey_s_c i
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool bch2_inode_open(struct bch_fs *c, struct bpos p)
|
static bool bch2_inode_is_open(struct bch_fs *c, struct bpos p)
|
||||||
{
|
{
|
||||||
subvol_inum inum = {
|
subvol_inum inum = {
|
||||||
.subvol = snapshot_t(c, p.snapshot)->subvol,
|
.subvol = snapshot_t(c, p.snapshot)->subvol,
|
||||||
@ -972,7 +972,7 @@ static bool bch2_inode_open(struct bch_fs *c, struct bpos p)
|
|||||||
|
|
||||||
/* snapshot tree corruption, can't safely delete */
|
/* snapshot tree corruption, can't safely delete */
|
||||||
if (!inum.subvol) {
|
if (!inum.subvol) {
|
||||||
bch_err_ratelimited(c, "%s(): snapshot %u has no subvol", __func__, p.snapshot);
|
bch_warn_ratelimited(c, "%s(): snapshot %u has no subvol, unlinked but can't safely delete", __func__, p.snapshot);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1057,7 +1057,7 @@ static int check_inode(struct btree_trans *trans,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (u.bi_flags & BCH_INODE_unlinked &&
|
if (u.bi_flags & BCH_INODE_unlinked &&
|
||||||
!bch2_inode_open(c, k.k->p) &&
|
!bch2_inode_is_open(c, k.k->p) &&
|
||||||
(!c->sb.clean ||
|
(!c->sb.clean ||
|
||||||
fsck_err(trans, inode_unlinked_but_clean,
|
fsck_err(trans, inode_unlinked_but_clean,
|
||||||
"filesystem marked clean, but inode %llu unlinked",
|
"filesystem marked clean, but inode %llu unlinked",
|
||||||
|
Loading…
Reference in New Issue
Block a user