Re: [PATCH RFC v2 00/14] md: introduce a new lockless bitmap
From: Christoph Hellwig
Date: Fri Mar 28 2025 - 07:07:19 EST
On Fri, Mar 28, 2025 at 02:08:39PM +0800, Yu Kuai wrote:
> A hidden disk, named mdxxx_bitmap, is created for bitmap, see details in
> llbitmap_add_disk(). And a file is created as well to manage bitmap IO for
> this disk, see details in llbitmap_open_disk(). Read/write bitmap is
> converted to buffer IO to this file.
>
> IO fast path will set bits to dirty, and those dirty bits will be cleared
> by daemon after IO is done. llbitmap_barrier is used to syncronize between
> IO path and daemon;
Why do you need a separate gendisk? I'll try to find some time to read
the code to understand what it does, but it would also be really useful
to explain the need for such an unusual concept here.