1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

raid: reshape synchronization point

Give udev time to get in sync and give md-core time to wake up
after table reload.
This commit is contained in:
Zdenek Kabelac 2017-07-20 19:04:59 +02:00
parent 8e0c5d0cb6
commit 39ebacdb5a
2 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.174 - Version 2.02.174 -
================================= =================================
Add synchronization points with udev during reshape of raid LVs.
Version 2.02.173 - 20th July 2017 Version 2.02.173 - 20th July 2017
================================= =================================

View File

@ -3853,6 +3853,12 @@ static int _eliminate_extracted_lvs_optional_write_vg(struct volume_group *vg,
struct dm_list *removal_lvs, struct dm_list *removal_lvs,
int vg_write_requested) int vg_write_requested)
{ {
if (!sync_local_dev_names(vg->cmd)) {
log_error("Failed to sync local devices after removing %u LVs in VG %s.",
dm_list_size(removal_lvs), vg->name);
return 0;
}
if (!removal_lvs || dm_list_empty(removal_lvs)) if (!removal_lvs || dm_list_empty(removal_lvs))
return 1; return 1;
@ -3868,6 +3874,13 @@ static int _eliminate_extracted_lvs_optional_write_vg(struct volume_group *vg,
backup(vg); backup(vg);
} }
/* Wait for events following any deactivation. */
if (!sync_local_dev_names(vg->cmd)) {
log_error("Failed to sync local devices after removing %u LVs in VG %s.",
dm_list_size(removal_lvs), vg->name);
return 0;
}
return 1; return 1;
} }