* [PATCH] md-cluster: fix safemode_delay non-zero when bitmap switch to clustered
@ 2020-07-15 17:04 Zhao Heming
0 siblings, 0 replies; only message in thread
From: Zhao Heming @ 2020-07-15 17:04 UTC (permalink / raw)
To: linux-raid; +Cc: Zhao Heming
reproduction steps:
```
node1 # mdadm --zero-superblock /dev/sd{b,c,d}
node1 # mdadm -C /dev/md0 -b internal -e 1.2 -n 2 -l mirror /dev/sdb /dev/sdc
node1 # cat /sys/block/md0/md/safe_mode_delay
0.204
node1 # mdadm -G /dev/md0 -b none
node1 # mdadm --grow /dev/md0 --bitmap=clustered
node1 # cat /sys/block/md0/md/safe_mode_delay
0.204 <== doesn't change, should ZERO for cluster-md
```
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
---
drivers/md/md-bitmap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 95a5f3757fa3..547adea1d1e6 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -2344,6 +2344,8 @@ location_store(struct mddev *mddev, const char *buf, size_t len)
mddev_resume(mddev);
goto out;
}
+ if (mddev_is_clustered(mddev))
+ mddev->safemode_delay = 0;
mddev_resume(mddev);
}
}
--
2.16.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-15 17:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-15 17:04 [PATCH] md-cluster: fix safemode_delay non-zero when bitmap switch to clustered Zhao Heming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).