mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] md/bitmap: resume array on backlog_store() error path
@ 2026-07-18  3:42 Chen Cheng
  2026-07-19 10:32 ` yu kuai
  2026-07-31  5:18 ` yu kuai
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Cheng @ 2026-07-18  3:42 UTC (permalink / raw)
  To: linux-raid, yukuai; +Cc: chencheng, chencheng, linux-kernel

From: Chen Cheng <chencheng@fnnas.com>

backlog_store() suspends the array before checking whether a write-mostly
device exists. If no such device exists, the error path only unlocks
reconfig_mutex and leaves the array suspended, blocking subsequent I/O.

Use mddev_unlock_and_resume() to release both states.

Fixes: 58226942ad3d ("md: use new apis to suspend array before mddev_create/destroy_serial_pool")

Signed-off-by: Chen Cheng <chencheng@fnnas.com>
---
 drivers/md/md-bitmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 028b9ca8ce52..3e40cb45d473 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -2854,11 +2854,11 @@ backlog_store(struct mddev *mddev, const char *buf, size_t len)
 		}
 	}
 	if (!has_write_mostly) {
 		pr_warn_ratelimited("%s: can't set backlog, no write mostly device available\n",
 				    mdname(mddev));
-		mddev_unlock(mddev);
+		mddev_unlock_and_resume(mddev);
 		return -EINVAL;
 	}
 
 	mddev->bitmap_info.max_write_behind = backlog;
 	if (!backlog && mddev->serial_info_pool) {
-- 
2.54.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] md/bitmap: resume array on backlog_store() error path
  2026-07-18  3:42 [PATCH] md/bitmap: resume array on backlog_store() error path Chen Cheng
@ 2026-07-19 10:32 ` yu kuai
  2026-07-31  5:18 ` yu kuai
  1 sibling, 0 replies; 3+ messages in thread
From: yu kuai @ 2026-07-19 10:32 UTC (permalink / raw)
  To: Chen Cheng, linux-raid, yukuai; +Cc: chencheng, linux-kernel

在 2026/7/18 11:42, Chen Cheng 写道:

> From: Chen Cheng<chencheng@fnnas.com>
>
> backlog_store() suspends the array before checking whether a write-mostly
> device exists. If no such device exists, the error path only unlocks
> reconfig_mutex and leaves the array suspended, blocking subsequent I/O.
>
> Use mddev_unlock_and_resume() to release both states.
>
> Fixes: 58226942ad3d ("md: use new apis to suspend array before mddev_create/destroy_serial_pool")
>
> Signed-off-by: Chen Cheng<chencheng@fnnas.com>
> ---
>   drivers/md/md-bitmap.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Yu Kuai <yukuai@fygo.io>

-- 
Thanks,
Kuai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] md/bitmap: resume array on backlog_store() error path
  2026-07-18  3:42 [PATCH] md/bitmap: resume array on backlog_store() error path Chen Cheng
  2026-07-19 10:32 ` yu kuai
@ 2026-07-31  5:18 ` yu kuai
  1 sibling, 0 replies; 3+ messages in thread
From: yu kuai @ 2026-07-31  5:18 UTC (permalink / raw)
  To: Chen Cheng, linux-raid, yu kuai; +Cc: chencheng, linux-kernel

在 2026/7/18 11:42, Chen Cheng 写道:

> From: Chen Cheng<chencheng@fnnas.com>
>
> backlog_store() suspends the array before checking whether a write-mostly
> device exists. If no such device exists, the error path only unlocks
> reconfig_mutex and leaves the array suspended, blocking subsequent I/O.
>
> Use mddev_unlock_and_resume() to release both states.
>
> Fixes: 58226942ad3d ("md: use new apis to suspend array before mddev_create/destroy_serial_pool")
>
> Signed-off-by: Chen Cheng<chencheng@fnnas.com>
> ---
>   drivers/md/md-bitmap.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
Applied to md-7.3

-- 
Thanks,
Kuai

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-31  5:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-18  3:42 [PATCH] md/bitmap: resume array on backlog_store() error path Chen Cheng
2026-07-19 10:32 ` yu kuai
2026-07-31  5:18 ` yu kuai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®