Linux-bcache Archive mirror
 help / color / mirror / Atom feed
From: Eric Wheeler <bcache@lists.ewheeler.net>
To: Coly Li <colyli@suse.de>
Cc: linux-bcache@vger.kernel.org, Mingzhe Zou <mingzhe.zou@easystack.cn>
Subject: bcache: bch_extent_bad() stale dirty pointer
Date: Thu, 11 Apr 2024 19:42:59 -0700 (PDT)	[thread overview]
Message-ID: <dd6d4e1-dcd9-81e2-4be1-1999dae5a90@ewheeler.net> (raw)

Hi Coly and Mingzhe,

Have you ever seen this dmesg notice before?  It only printed two lines 
into dmesg:

[Apr11 19:28] bcache: bch_extent_bad() stale dirty pointer, stale 1, key: 0:15956311168 len 24 -> [0:32419560 gen 88] dirty
[  +0.014297] bcache: bch_extent_bad() stale dirty pointer, stale 1, key: 0:15956311168 len 24 -> [0:32419560 gen 88] dirty

This doesn't look like its a major concern, after all just this is a 
pr_info, and the "stale" value of "1" is well below BUCKET_GC_GEN_MAX (96) 
so I'm not at risk of hitting btree_bug_on().

Is this something that should be addressed?

Near extents.c:537:

static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
{
        struct btree *b = container_of(bk, struct btree, keys);
        unsigned int i, stale;
        char buf[80];

        if (!KEY_PTRS(k) ||
            bch_extent_invalid(bk, k))
                return true;

        for (i = 0; i < KEY_PTRS(k); i++)
                if (!ptr_available(b->c, k, i))
                        return true;

        for (i = 0; i < KEY_PTRS(k); i++) {
                stale = ptr_stale(b->c, k, i);

                if (stale && KEY_DIRTY(k)) {
                        bch_extent_to_text(buf, sizeof(buf), k);
                        pr_info("stale dirty pointer, stale %u, key: %s\n",  <<<<<<<
                                stale, buf);
                }

                btree_bug_on(stale > BUCKET_GC_GEN_MAX, b,
                             "key too stale: %i, need_gc %u",
                             stale, b->c->need_gc);

                if (stale)
                        return true;

                if (expensive_debug_checks(b->c) &&
                    bch_extent_bad_expensive(b, k, i))
                        return true;
        }

        return false;
}



--
Eric Wheeler

                 reply	other threads:[~2024-04-12  2:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd6d4e1-dcd9-81e2-4be1-1999dae5a90@ewheeler.net \
    --to=bcache@lists.ewheeler.net \
    --cc=colyli@suse.de \
    --cc=linux-bcache@vger.kernel.org \
    --cc=mingzhe.zou@easystack.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).