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
20
Grow.c
20
Grow.c
|
@ -2039,26 +2039,30 @@ started:
|
||||||
if (d < 0) {
|
if (d < 0) {
|
||||||
goto release;
|
goto release;
|
||||||
}
|
}
|
||||||
|
if ((st->ss->manage_reshape == NULL) ||
|
||||||
|
(st->ss->recover_backup == NULL)) {
|
||||||
if (backup_file == NULL) {
|
if (backup_file == NULL) {
|
||||||
if (reshape.after.data_disks <= reshape.before.data_disks) {
|
if (reshape.after.data_disks <=
|
||||||
fprintf(stderr,
|
reshape.before.data_disks) {
|
||||||
Name ": %s: Cannot grow - need backup-file\n",
|
fprintf(stderr, Name ": %s: Cannot grow - "
|
||||||
devname);
|
"need backup-file\n", devname);
|
||||||
goto release;
|
goto release;
|
||||||
} else if (sra->array.spare_disks == 0) {
|
} else if (sra->array.spare_disks == 0) {
|
||||||
fprintf(stderr, Name ": %s: Cannot grow - need a spare or "
|
fprintf(stderr, Name ": %s: Cannot grow - "
|
||||||
"backup-file to backup critical section\n",
|
"need a spare or backup-file to backup "
|
||||||
devname);
|
"critical section\n", devname);
|
||||||
goto release;
|
goto release;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!reshape_open_backup_file(backup_file, fd, devname,
|
if (!reshape_open_backup_file(backup_file, fd, devname,
|
||||||
(signed)blocks,
|
(signed)blocks,
|
||||||
fdlist+d, offsets+d, restart)) {
|
fdlist+d, offsets+d,
|
||||||
|
restart)) {
|
||||||
goto release;
|
goto release;
|
||||||
}
|
}
|
||||||
d++;
|
d++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* lastly, check that the internal stripe cache is
|
/* lastly, check that the internal stripe cache is
|
||||||
* large enough, or it won't work.
|
* large enough, or it won't work.
|
||||||
|
|
Loading…
Reference in New Issue