From: Nix <nix@esperi.org.uk>
To: Coly Li <i@coly.li>
Cc: linux-bcache@vger.kernel.org
Subject: Re: gen wraparound warning: is this a problem?
Date: Wed, 10 Sep 2025 16:54:38 +0100 [thread overview]
Message-ID: <871poecngh.fsf@esperi.org.uk> (raw)
In-Reply-To: <C155231F-E439-46E5-8AFE-502CB75F183C@coly.li> (Coly Li's message of "Mon, 8 Sep 2025 14:51:41 +0800")
On 8 Sep 2025, Coly Li verbalised:
>> 2025年9月7日 22:37,Nix <nix@esperi.org.uk> 写道:
>>
>> So, out of the blue, I just got this for my long-standing writearound
>> bcache setup (which covers my rootfs and $HOME, so I kind of care that
>> it keeps working):
(Oh, this is kernel 6.15.6 -- but that's only since Jul 20th. Before
that, I was running 5.16.19 right back to April 2022, yes, I know... so
it's possible this wasn't touched by *5.16* and thus this is a bug that
was fixed long ago.)
>> These both map to this in bch_inc_gen():
>>
>> WARN_ON_ONCE(ca->set->need_gc > BUCKET_GC_GEN_MAX);
>
> It seems a bucket has not been touched by garbage collection for a long time.
Not too surprising: half-terabyte cache, and the xfs filesystems it
backs only has 1.5TiB of data on it and not all of it is accessed
frequently, and some is bypassed... so it can take a long time to gc
through the entire cache :) it took months just to fill it.
>> Is this something the admin needs to do something about? (And, if it's
>> not and bcache recovers smoothly, as so far it seems to -- though I
>> haven't tried to remount it since the warning -- why do we warn about
>> it at all?)
>
> I don’t know why this bucket is not touched by GC for such a long
> time. It should not happen in my expectation.
It's possible that *no* buckets were touched for a long time.
> To make sure everything is safe, I would suggest to writeback all the
> dirty datas into backing device, detach the cache device, re-make the
> cache device and attach backing device to it again.
There is no dirty data (writethrough cache)... and this is backing the
rootfs, among other things, so IIRC detaching is quite difficult and
panic-prone to do (it's been many years, but I believe you can't do it
while mounted?). I'll schedule it for the next reboot...
next prev parent reply other threads:[~2025-09-10 15:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-07 14:37 gen wraparound warning: is this a problem? Nix
[not found] ` <C155231F-E439-46E5-8AFE-502CB75F183C@coly.li>
2025-09-10 15:54 ` Nix [this message]
2025-09-24 16:04 ` Coly Li
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=871poecngh.fsf@esperi.org.uk \
--to=nix@esperi.org.uk \
--cc=i@coly.li \
--cc=linux-bcache@vger.kernel.org \
/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