aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2005-11-09 00:39:42 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:39 -0500
commitfd9d49cac46f5758d513ccf831b599dd4412546f (patch)
tree980dcde5398f3d0f2724637dd499f922551328d3 /drivers/md/md.c
parent8e1b39d623359e5ef7983a2bd0fb676be45cba31 (diff)
[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: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 47b8685d4bdf..25f2bbfe6a2b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2058,6 +2058,9 @@ static int do_md_run(mddev_t * mddev)
2058 } 2058 }
2059 if (mddev->pers->sync_request) 2059 if (mddev->pers->sync_request)
2060 sysfs_create_group(&mddev->kobj, &md_redundancy_group); 2060 sysfs_create_group(&mddev->kobj, &md_redundancy_group);
2061 else if (mddev->ro == 2) /* auto-readonly not meaningful */
2062 mddev->ro = 0;
2063
2061 atomic_set(&mddev->writes_pending,0); 2064 atomic_set(&mddev->writes_pending,0);
2062 mddev->safemode = 0; 2065 mddev->safemode = 0;
2063 mddev->safemode_timer.function = md_safemode_timeout; 2066 mddev->safemode_timer.function = md_safemode_timeout;