Re: [PATCH] bcache: enhancing the security of dirty data writeback

Coly Li <[email protected]>
Newsgroups org.kernel.vger.linux-bcache,org.kernel.vger.linux-kernel
Message-ID <20250805033120.7pzcpcjtpz5clnnz@P16.>
On Mon, Aug 04, 2025 at 09:31:38PM -0400, Kent Overstreet wrote:
> > Could we consider the solution I submitted, which is based on the
> > following main principle:
> > 1. Firstly, in the write_dirty_finish stage, the dirty marking bkeys are
> > not inserted into the btree immediately. Instead, they are temporarily
> > stored in an internal memory queue called Alist.
> > 2. Then, when the number of bkeys in Alist exceeds a certain limit, a
> > flush request is sent to the backend HDD.
> > 3. After the flush is sent, the bkeys recorded in Alist are then
> > inserted into the btree.
> > This process ensures that the written dirty data is written to the disk
> > before the btree is updated. The length of Alist can be configured,
> > allowing for better control of the flush sending frequency and reducing
> > the impact of the flush on the write speed.
> 
> That approach should work as well. You'll want to make the list size
> rather bit, and add statistics for how ofter flushes are being issued.
>

OK, then let me review this patch.

Coly Li
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.