1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

RAID1: Clear the LV_NOTSYNCED flag when a RAID1 LV is converted to linear

Failing to clear the LV_NOTSYNCED flag when converting a RAID1 LV to
linear can result in the flag being present after an upconvert - even
if the sync is performed when upconverting.
This commit is contained in:
Jonathan Brassow 2012-09-14 16:26:53 -05:00
parent 116bcb3ea4
commit 2a6712ddef
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.98 -
=================================
Clear LV_NOSYNCED flag when a RAID1 LV is converted to a linear LV.
Disallow RAID1 upconvert if the LV was created with --nosync.
Depend on systemd-udev-settle in units generated by activation generator.
Fix vgchange -aay to activate proper logical volumes.

View File

@ -1022,10 +1022,14 @@ static int _raid_remove_images(struct logical_volume *lv,
}
/* Convert to linear? */
if ((new_count == 1) && !_raid_remove_top_layer(lv, &removal_list)) {
log_error("Failed to remove RAID layer after linear conversion");
if (new_count == 1) {
if (!_raid_remove_top_layer(lv, &removal_list)) {
log_error("Failed to remove RAID layer"
" after linear conversion");
return 0;
}
lv->status &= ~LV_NOTSYNCED;
}
if (!vg_write(lv->vg)) {
log_error("Failed to write changes to %s in %s",