diff options
author | NeilBrown <neilb@suse.de> | 2012-10-04 16:34:21 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-04 16:34:21 +1000 |
commit | 5e88ab2e2f87c4009529c19746841db136c8e1b9 (patch) | |
tree | fdeb31cf99be3c5a4f4b3e77e5db90780b4c75af /Assemble.c | |
parent | 19ceb16dafb7df98ff90298008d4488dc93b370a (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 'Assemble.c')
-rw-r--r-- | Assemble.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1192,7 +1192,8 @@ int Assemble(struct supertype *st, char *mddev, * The code of doing this lives in Grow.c */ #ifndef MDASSEMBLE - if (content->reshape_active) { + if (content->reshape_active && + !(content->reshape_active & RESHAPE_NO_BACKUP)) { int err = 0; int *fdlist = xmalloc(sizeof(int)* bestcnt); if (c->verbose > 0) @@ -1368,6 +1369,7 @@ int Assemble(struct supertype *st, char *mddev, int rv; #ifndef MDASSEMBLE if (content->reshape_active && + !(content->reshape_active & RESHAPE_NO_BACKUP) && content->delta_disks <= 0) { rv = sysfs_set_str(content, NULL, "array_state", "readonly"); |