md: record dm-raid gendisk in mddev

Following patch will use gendisk to check if there are normal IO
completed or inflight, to fix a problem in mdraid that foreground IO
can be starved by background sync IO in later patches.

Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-7-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
This commit is contained in:
Yu Kuai
2025-05-06 20:49:00 +08:00
parent f2987c5816
commit 7168be3c8a
2 changed files with 5 additions and 1 deletions

View File

@@ -404,7 +404,8 @@ struct mddev {
* are happening, so run/
* takeover/stop are not safe
*/
struct gendisk *gendisk;
struct gendisk *gendisk; /* mdraid gendisk */
struct gendisk *dm_gendisk; /* dm-raid gendisk */
struct kobject kobj;
int hold_active;