When reshape process is guarded by metadata specific checkpointing, backup file is no longer necessary. Remove backup file requirement from mdadm command line when reshape_super and manage reshape_super are defined for external metadata case. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Grow.c b/Grow.c index 7253e5a..fdc5bfd 100644 --- a/Grow.c +++ b/Grow.c @@ -1659,6 +1659,11 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, goto release; } if (backup_file == NULL) { + int backup_file_required_for_external; + + backup_file_required_for_external = st->ss->external && + st->ss->reshape_super && st->ss->manage_reshape; + if (st->ss->external && !st->ss->manage_reshape) { fprintf(stderr, Name ": %s Grow operation not supported by %s metadata\n", devname, st->ss->name); @@ -1666,10 +1671,12 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, break; } if (ndata <= odata) { - fprintf(stderr, Name ": %s: Cannot grow - need backup-file\n", - devname); - rv = 1; - break; + if (!backup_file_required_for_external) { + fprintf(stderr, Name ": %s: Cannot grow - need backup-file\n", + devname); + rv = 1; + break; + } } else if (sra->array.spare_disks == 0) { fprintf(stderr, Name ": %s: Cannot grow - need a spare or " "backup-file to backup critical section\n", @@ -1678,10 +1685,12 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, break; } if (d == array.raid_disks) { - fprintf(stderr, Name ": %s: No spare device for backup\n", - devname); - rv = 1; - break; + if (!backup_file_required_for_external) { + fprintf(stderr, Name ": %s: No spare device for backup\n", + devname); + rv = 1; + break; + } } } else { /* need to check backup file is large enough */ -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html