summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-08-19 17:55:15 +1000
committerNeilBrown <neilb@suse.de>2008-08-19 17:55:15 +1000
commite9dd159873cfa0da1ec3e4f173c24f330ea526f8 (patch)
treef95abf6b0736b9f7a0bd3743d037bc8f3f7b793d /managemon.c
parent3c558363a1991430e8a9e10c93ee9ee3f8996940 (diff)
downloadmdadm-e9dd159873cfa0da1ec3e4f173c24f330ea526f8.tar.gz
mdadm-e9dd159873cfa0da1ec3e4f173c24f330ea526f8.tar.xz
mdadm-e9dd159873cfa0da1ec3e4f173c24f330ea526f8.zip
Allow an externally managed array to be marked readonly
If the metadata_version is -mdXXX/whatever rather than /mdXXX/whatever then the array is readonly and should be left alone by mdmon. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/managemon.c b/managemon.c
index 1c329c5..15e431f 100644
--- a/managemon.c
+++ b/managemon.c
@@ -460,6 +460,7 @@ static void manage_new(struct mdstat_ent *mdstat,
new->action_fd = sysfs_open(new->devnum, NULL, "sync_action");
new->info.state_fd = sysfs_open(new->devnum, NULL, "array_state");
new->resync_start_fd = sysfs_open(new->devnum, NULL, "resync_start");
+ new->metadata_fd = sysfs_open(new->devnum, NULL, "metadata_version");
get_resync_start(new);
dprintf("%s: inst: %d action: %d state: %d\n", __func__, atoi(inst),
new->action_fd, new->info.state_fd);