summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-10-03 09:15:22 +1100
committerNeilBrown <neilb@suse.de>2011-10-03 09:15:22 +1100
commitb76b30e0f95008b840849e5f176eaeca20545a9a (patch)
tree239b683f80c488eed2d2e4ccf44d3dbff902b64c /Assemble.c
parentcc700db34f6fb565b37f4edf7fe7fe40a5f2745b (diff)
Do not continue reshape during initrd phase
During initrd phase continuing reshape will cause file system context lost. This blocks ability to control reshape using checkpoints. To avoid this, during initrd phase assemble has to be executed with '--freeze-reshape' option. This causes that mdadm restores reshape critical section only. Reshape can be continued later after system full boot. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Assemble.c b/Assemble.c
index c6aad204..afca38e6 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -138,7 +138,7 @@ int Assemble(struct supertype *st, char *mddev,
char *backup_file, int invalid_backup,
int readonly, int runstop,
char *update, char *homehost, int require_homehost,
- int verbose, int force)
+ int verbose, int force, int freeze_reshape)
{
/*
* The task of Assemble is to find a collection of
@@ -697,7 +697,7 @@ int Assemble(struct supertype *st, char *mddev,
int err;
err = assemble_container_content(st, mdfd, content, runstop,
chosen_name, verbose,
- backup_file);
+ backup_file, freeze_reshape);
close(mdfd);
return err;
}
@@ -1344,7 +1344,8 @@ int Assemble(struct supertype *st, char *mddev,
#ifndef MDASSEMBLE
if (content->reshape_active &&
content->delta_disks <= 0)
- rv = Grow_continue(mdfd, st, content, backup_file);
+ rv = Grow_continue(mdfd, st, content,
+ backup_file, freeze_reshape);
else
#endif
rv = ioctl(mdfd, RUN_ARRAY, NULL);
@@ -1511,7 +1512,7 @@ int Assemble(struct supertype *st, char *mddev,
int assemble_container_content(struct supertype *st, int mdfd,
struct mdinfo *content, int runstop,
char *chosen_name, int verbose,
- char *backup_file)
+ char *backup_file, int freeze_reshape)
{
struct mdinfo *dev, *sra;
int working = 0, preexist = 0;
@@ -1560,7 +1561,8 @@ int assemble_container_content(struct supertype *st, int mdfd,
spare, backup_file, verbose) == 1)
return 1;
- err = Grow_continue(mdfd, st, content, backup_file);
+ err = Grow_continue(mdfd, st, content, backup_file,
+ freeze_reshape);
} else switch(content->array.level) {
case LEVEL_LINEAR:
case LEVEL_MULTIPATH: