]> www.infradead.org Git - users/hch/block.git/commitdiff
bcachefs: Improve bch2_is_inode_open() warning message
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 23 Sep 2024 21:33:02 +0000 (17:33 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 28 Sep 2024 01:46:34 +0000 (21:46 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c

index 9b3470a975461f777221443d4953cbd391a3fe66..89129548aebb68c76d4244f64af222c95e6e2f10 100644 (file)
@@ -963,7 +963,7 @@ fsck_err:
        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 = 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 */
        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;
        }
 
@@ -1057,7 +1057,7 @@ static int check_inode(struct btree_trans *trans,
        }
 
        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 ||
             fsck_err(trans, inode_unlinked_but_clean,
                      "filesystem marked clean, but inode %llu unlinked",