Re: [PATCH v2 0/1] bcache: track active bypass writes to prevent stale cache reads

"Coly Li" <[email protected]> Mon, 6 Jul 2026 15:51:44 +0800
Newsgroups org.kernel.vger.linux-bcache,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
> 2026=E5=B9=B47=E6=9C=886=E6=97=A5 15:39=EF=BC=8CColy Li <[email protected]> =
=E5=86=99=E9=81=93=EF=BC=9A
>=20
>> u16 counters: I realized clamping at U16_MAX completely breaks the
>> decrement path. If an I/O burst exceeds 65,535 writes, clamping loses
>> the true count. The counter will drop to 0 prematurely while writes
>> are still in flight, leaving a window for stale reads.
>>=20
>=20
> Using u32 is good. For 100TB cache, the refcount pages may occupy around
                                                   ^^^^^^
                                                   This is a typo, should b=
e backend.
> 100MB more or less memory. IMHO that's acceptable.

Coly Li