提交 b6d428c6 编写于 作者: N NeilBrown

md: don't update metadata when stopping a read-only array.

read-only arrays should stay that way as much as possible.
Updating the metadata - which could be triggered by a re-add
while assembling the array metadata - should be avoided.
Signed-off-by: NNeilBrown <neilb@suse.de>
上级 7ceb17e8
......@@ -5293,7 +5293,8 @@ static void __md_stop_writes(struct mddev *mddev)
bitmap_flush(mddev);
md_super_wait(mddev);
if (!mddev->in_sync || mddev->flags) {
if (mddev->ro == 0 &&
(!mddev->in_sync || mddev->flags)) {
/* mark array as shutdown cleanly */
mddev->in_sync = 1;
md_update_sb(mddev, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册