summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-05-15 14:23:16 +1000
committerNeilBrown <neilb@suse.de>2014-05-15 14:23:16 +1000
commit54ded86fbd7a6a14896cd4a26b909759a1153366 (patch)
treeb6c13ec66072a0d8ffbe5b6590eddfbc8ada1ade /Assemble.c
parent39917e56ccbabe0b53771ea698c1284b14c62fa3 (diff)
Grow: store a link to current backup file in /run/mdadm or similar.
Subsequent patch will allow the background part of "mdadm --grow" to be run from systemd. This can require the passing of a backup file name. To do this, store that name as a symlink in /run/mdadm (or MAP_DIR) and look for it when appropriate. It might be useful to also store the name across reboot, but that would be a different patch. We would need to use the uuid to identify it, and store it in stable storage. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Assemble.c b/Assemble.c
index 05ace561..89779285 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1680,6 +1680,8 @@ try_again:
pr_err(":%s has an active reshape - checking "
"if critical section needs to be restored\n",
chosen_name);
+ if (!c->backup_file)
+ c->backup_file = locate_backup(content->sys_name);
enable_fds(bestcnt/2);
for (i = 0; i < bestcnt/2; i++) {
int j = best[i*2];
@@ -1892,7 +1894,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
int spare = content->array.raid_disks + expansion;
if (restore_backup(st, content,
working,
- spare, c->backup_file, c->verbose) == 1)
+ spare, &c->backup_file, c->verbose) == 1)
return 1;
err = sysfs_set_str(content, NULL,