Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

md/md-bitmap: make method bitmap_ops->daemon_work optional

daemon_work() will be called by daemon thread, on the one hand, daemon
thread doesn't have strict wake-up time; on the other hand, too much
work are put to daemon thread, like handle sync IO, handle failed
or specail normal IO, handle recovery, and so on. Hence daemon thread
may be too busy to clear dirty bits in time.

Make bitmap_ops->daemon_work() optional and following patches will use
separate async work to clear dirty bits for the new bitmap.

Link: https://lore.kernel.org/linux-raid/20250829080426.1441678-11-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Li Nan <linan122@huawei.com>

Yu Kuai 66be318e c951ccf0

+1 -1
+1 -1
drivers/md/md.c
··· 9997 9997 */ 9998 9998 void md_check_recovery(struct mddev *mddev) 9999 9999 { 10000 - if (md_bitmap_enabled(mddev, false)) 10000 + if (md_bitmap_enabled(mddev, false) && mddev->bitmap_ops->daemon_work) 10001 10001 mddev->bitmap_ops->daemon_work(mddev); 10002 10002 10003 10003 if (signal_pending(current)) {