From b76b30e0f95008b840849e5f176eaeca20545a9a Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Mon, 3 Oct 2011 09:15:22 +1100 Subject: 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 Signed-off-by: NeilBrown --- Assemble.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Assemble.c') 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: -- cgit v1.2.3