Re: gen wraparound warning: is this a problem?
Nix <[email protected]> Wed, 10 Sep 2025 16:54:38 +0100
| Newsgroups | org.kernel.vger.linux-bcache |
|---|---|
| Message-ID | <[email protected]> |
On 8 Sep 2025, Coly Li verbalised: >> 2025年9月7日 22:37,Nix <[email protected]> 写道: >> >> 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...