[lvm-devel] master - RAID1: Clear the LV_NOTSYNCED flag when a RAID1 LV is converted to linear
Jonathan Brassow
jbrassow at fedoraproject.org
Fri Sep 14 21:29:09 UTC 2012
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a6712ddefb6720d115d11c276223b57abf5dd94
Commit: 2a6712ddefb6720d115d11c276223b57abf5dd94
Parent: 116bcb3ea4c3e4b030180757fb5be149af1fda07
Author: Jonathan Brassow <jbrassow at redhat.com>
AuthorDate: Fri Sep 14 16:26:53 2012 -0500
Committer: Jonathan Brassow <jbrassow at redhat.com>
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(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6ef9d5c..f2aa7ec 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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.
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 131f9d2..0266013 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -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)) {
More information about the lvm-devel
mailing list