提交 fd9d49ca 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[PATCH] md: ignore auto-readonly flag for arrays where it isn't meaningful

The 'auto-readonly' flag (which suppresses resync and superblock updates until
the first write) is not meaningful for personalities that don't support resync
or superblock writes (raid0, linear, etc).

So clear the setting early to avoid it confusing anything - e.g.  appearing in
/proc/mdstat
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 8e1b39d6
......@@ -2058,6 +2058,9 @@ static int do_md_run(mddev_t * mddev)
}
if (mddev->pers->sync_request)
sysfs_create_group(&mddev->kobj, &md_redundancy_group);
else if (mddev->ro == 2) /* auto-readonly not meaningful */
mddev->ro = 0;
atomic_set(&mddev->writes_pending,0);
mddev->safemode = 0;
mddev->safemode_timer.function = md_safemode_timeout;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册