Re: [PATCH] bcache: enhancing the security of dirty data writeback
Kent Overstreet <[email protected]>
| Newsgroups | org.kernel.vger.linux-bcache,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <ylqh742munbd2iwmupsia6wjpgs4nzmodlfstbbpht6rbdpkqz@dhprafznlx2z> |
On Tue, Aug 05, 2025 at 11:31:20AM +0800, Coly Li wrote: > 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 s/rather bit/rather large