master - RAID1: Clear the LV_NOTSYNCED flag when a RAID1 LV is converted to linear
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a6712ddefb6720d115d11c276223b57abf5dd94 Commit: 2a6712ddefb6720d115d11c276223b57abf5dd94 Parent: 116bcb3ea4c3e4b030180757fb5be149af1fda07 Author: Jonathan Brassow <[email protected]> AuthorDate: Fri Sep 14 16:26:53 2012 -0500 Committer: Jonathan Brassow <[email protected]> CommitterDate: Fri Sep 14 16:26:53 2012 -0500
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.
--- WHATS_NEW | 1 + lib/metadata/raid_manip.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-)
WHATS_NEW +1 -0
@@ -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.
lib/metadata/raid_manip.c +7 -3
@@ -1022,9 +1022,13 @@ 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" ); -return 0 ; +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)) {