Re: [PATCH 06/23] md/md-bitmap: add a new sysfs api bitmap_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

在 2025/05/26 13:11, Xiao Ni 写道:
On Mon, May 26, 2025 at 9:14 AM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:

Hi,

在 2025/05/26 0:32, Xiao Ni 写道:
The api will be used by mdadm to set bitmap_ops while creating new array
Hi Kuai

Maybe you want to say "set bitmap type" here? And can you explain more
here, why does it need this sys file while creating a new array? The
reason I ask is that it doesn't use a sys file when creating an array
with bitmap.

I do mean mddev->bitmap_ops here, this is the same as mddev->pers and
the md/level api. The mdadm patch will write the new helper before
running array.

+ if (s->btype == BitmapLockless &&
+    sysfs_set_str(&info, NULL, "bitmap_type", "llbitmap") < 0)
+ goto abort_locked;

The three lines of code are in the Create function. From an intuitive
perspective, it's used to set bitmap type to llbitmap rather than
bitmap ops. And in this patch, it adds the bitmap_type sysfs api to
set mddev->bitmap_id. After adding some debug logs, I understand you.
It's better to describe here more. Because the sysfs file api is used
to set bitmap type. Then it can be used to choose the bitmap ops when
creating array in md_create_bitmap


Yes, sorry about the misleading, we're setting mddev->bitmap_id by
sysfs, and mddev->bitmap_ops by mddev->bitmap_id later in kernel(the
next patch).

Thanks,
Kuai





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux