summaryrefslogtreecommitdiff
path: root/Incremental.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-04 16:34:21 +1000
committerNeilBrown <neilb@suse.de>2012-10-04 16:34:21 +1000
commit5e88ab2e2f87c4009529c19746841db136c8e1b9 (patch)
treefdeb31cf99be3c5a4f4b3e77e5db90780b4c75af /Incremental.c
parent19ceb16dafb7df98ff90298008d4488dc93b370a (diff)
New RESHAPE_NO_BACKUP flag to track when backup action is needed.
Some arrays (raid10) never need a backup file, so during assembly we can avoid the whole Grow_continue check in that case. Achieve this using a flag set by the metadata handler. Also get "mdadm -I" to fail if a backup process would be needed. It currently does fail as the kernel rejects things, but it is nicer to have this explicit. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Incremental.c b/Incremental.c
index 8e101d70..1615c4df 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -494,6 +494,14 @@ int Incremental(char *devname, struct context *c,
if (c->runstop > 0 || active_disks >= info.array.working_disks) {
struct mdinfo *dsk;
/* Let's try to start it */
+
+ if (info.reshape_active && !(info.reshape_active & RESHAPE_NO_BACKUP)) {
+ fprintf(stderr, Name
+ ": %s: This array is being reshaped and cannot be started\n"
+ " by --incremental. Please use --assemble\n",
+ chosen_name);
+ goto out;
+ }
if (match && match->bitmap_file) {
int bmfd = open(match->bitmap_file, O_RDWR);
if (bmfd < 0) {
@@ -1285,6 +1293,9 @@ int IncrementalScan(int verbose)
me->path, strerror(errno));
}
}
+ /* FIXME check for reshape_active and consider not
+ * starting array.
+ */
sra = sysfs_read(mdfd, 0, 0);
if (sra) {
if (sysfs_set_str(sra, NULL,