[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250826085205.1061353-11-yukuai1@huaweicloud.com>
Date: Tue, 26 Aug 2025 16:52:04 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: hch@...radead.org,
corbet@....net,
agk@...hat.com,
snitzer@...nel.org,
mpatocka@...hat.com,
song@...nel.org,
xni@...hat.com,
hare@...e.de,
linan122@...wei.com,
colyli@...nel.org
Cc: linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
dm-devel@...ts.linux.dev,
linux-raid@...r.kernel.org,
yukuai3@...wei.com,
yukuai1@...weicloud.com,
yi.zhang@...wei.com,
yangerkun@...wei.com,
johnny.chenyi@...wei.com
Subject: [PATCH v6 md-6.18 10/11] md/md-bitmap: make method bitmap_ops->daemon_work optional
From: Yu Kuai <yukuai3@...wei.com>
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.
Signed-off-by: Yu Kuai <yukuai3@...wei.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Reviewed-by: Li Nan <linan122@...wei.com>
---
drivers/md/md.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 199843356449..3a3a3fdecfbd 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -9997,7 +9997,7 @@ static void unregister_sync_thread(struct mddev *mddev)
*/
void md_check_recovery(struct mddev *mddev)
{
- if (md_bitmap_enabled(mddev, false))
+ if (md_bitmap_enabled(mddev, false) && mddev->bitmap_ops->daemon_work)
mddev->bitmap_ops->daemon_work(mddev);
if (signal_pending(current)) {
--
2.39.2
Powered by blists - more mailing lists