Do not use backup file for external metadata
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@intel.com> Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
e919fb0af2
commit
13c37ad3f3
40
Grow.c
40
Grow.c
|
@ -2039,25 +2039,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;
|
||||
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++;
|
||||
}
|
||||
} else {
|
||||
if (!reshape_open_backup_file(backup_file, fd, devname,
|
||||
(signed)blocks,
|
||||
fdlist+d, offsets+d, restart)) {
|
||||
goto release;
|
||||
}
|
||||
d++;
|
||||
}
|
||||
|
||||
/* lastly, check that the internal stripe cache is
|
||||
|
|
Loading…
Reference in New Issue