summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-03-29 02:57:48 +0000
committerNeil Brown <neilb@suse.de>2006-03-29 02:57:48 +0000
commit7ef02d01432952ee677beca7b0f90b653b3d336b (patch)
treea3288a38053ede6c2a24051f53cb115f3a1813cb /config.c
parent2ae555c3d97336365063b5f6937646818667c482 (diff)
downloadmdadm-7ef02d01432952ee677beca7b0f90b653b3d336b.tar.gz
mdadm-7ef02d01432952ee677beca7b0f90b653b3d336b.tar.xz
mdadm-7ef02d01432952ee677beca7b0f90b653b3d336b.zip
Support 'bitmap=' in mdadm.conf for auto-assembling arrays with write-intent bitmaps in separate files.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.c b/config.c
index 1408b25..bb22b0e 100644
--- a/config.c
+++ b/config.c
@@ -281,6 +281,7 @@ void arrayline(char *line)
mis.next = NULL;
mis.st = NULL;
mis.bitmap_fd = -1;
+ mis.bitmap_file = NULL;
mis.name[0] = 0;
for (w=dl_next(line); w!=line; w=dl_next(w)) {
@@ -321,6 +322,13 @@ void arrayline(char *line)
else
strcpy(mis.name, w+5);
+ } else if (strncasecmp(w, "bitmap=", 7) == 0) {
+ if (mis.bitmap_file)
+ fprintf(stderr, Name ": only specify bitmap file once. %s ignored\n",
+ w);
+ else
+ mis.bitmap_file = w+7;
+
} else if (strncasecmp(w, "devices=", 8 ) == 0 ) {
if (mis.devices)
fprintf(stderr, Name ": only specify devices once (use a comma separated list). %s ignored\n",