From: Adam Kwolek <adam.kwolek@xxxxxxxxx> When external metatdata handler supports manage_reshape() and recover_backup() functions in super switch backup file is not required and can be omitted. For backup purposes metadata specific mechanisms are used. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@xxxxxxxxx> --- Grow.c | 40 ++++++++++++++++++++++------------------ 1 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Grow.c b/Grow.c index 25be587..8e67be2 100644 --- a/Grow.c +++ b/Grow.c @@ -2038,25 +2038,29 @@ started: if (d < 0) { goto release; } - if (backup_file == NULL) { - if (reshape.after.data_disks <= reshape.before.data_disks) { - fprintf(stderr, - Name ": %s: Cannot grow - need backup-file\n", - devname); - goto release; - } else if (sra->array.spare_disks == 0) { - fprintf(stderr, Name ": %s: Cannot grow - need a spare or " - "backup-file to backup critical section\n", - devname); - goto release; - } - } else { - if (!reshape_open_backup_file(backup_file, fd, devname, - (signed)blocks, - fdlist+d, offsets+d, restart)) { - goto release; + if ((st->ss->manage_reshape == NULL) || + (st->ss->recover_backup == NULL)) { + if (backup_file == NULL) { + if (reshape.after.data_disks <= + reshape.before.data_disks) { + fprintf(stderr, Name ": %s: Cannot grow - " + "need backup-file\n", devname); + goto release; + } else if (sra->array.spare_disks == 0) { + fprintf(stderr, Name ": %s: Cannot grow - " + "need a spare or backup-file to backup " + "critical section\n", devname); + goto release; + } + } else { + if (!reshape_open_backup_file(backup_file, fd, devname, + (signed)blocks, + fdlist+d, offsets+d, + restart)) { + goto release; + } + d++; } - d++; } /* lastly, check that the internal stripe cache is -- 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