Skip to contentSkip to conversation

master - lvconvert: fix polling outside of core lvconvert

PATCH okozina 1 participant 1 message Jul 22, 2015

lore
Share & tools
lore

okozina

author
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ae88bf03a1d109a342a8ad31196c3ef8fa1a5b65
Commit:        ae88bf03a1d109a342a8ad31196c3ef8fa1a5b65
Parent:        c3fddb0fbbcabf73d3bcf2786cea31c179f13fae
Author:        David Teigland <[email protected]>
AuthorDate:    Wed Jul 15 13:02:54 2015 -0500
Committer:     Ondrej Kozina <[email protected]>
CommitterDate: Wed Jul 22 10:38:02 2015 +0200

lvconvert: fix polling outside of core lvconvert

Recent change to move the polling outside of core lvconvert code was wrongly using 'lv' and 'vg' structs which can't be used outside of the core code, which caused seg fault.

Properly isolate all use of lv structs within the core of the lvconvert code, saving any information necessary, (esp lvid). After the core of lvconvert is done, use the saved information to do polling.

FIXME: the need for is_merging_origin and is_merging_origin_thin in this patch is ugly, and a cleaner way should be found to deal with that than what is done here.

Also it effectively removed all hacks in _lvconvert_merge_single performing ugly: VG reread, unlock, polling, lock sequence.

Moreover all polling operations are postponed after all conversions are finished.

lvm2 (while locking via lvmlockd) should now be able to run with or without lvmpolld while performing poll operations originating in lvconvert command.

---
 WHATS_NEW         |    1 +
 tools/lvconvert.c |  198 ++++++++++++++++++++++++++---------------------------
 2 files changed, 98 insertions(+), 101 deletions(-)
WHATS_NEW +1 -0
index 22a0233..adf8eb7 100644
@@ -1,5 +1,6 @@
 Version 2.02.126 -
 ================================
+  Fix lvconvert segfaults while performing snapshots merge.
   Ignore errors during detection if use_blkid_wiping=1 and --force is used.
   Recognise DM_ABORT_ON_INTERNAL_ERRORS env var override in lvm logging fn.
   Fix alloc segfault when extending LV with fewer stripes than in first seg.
tools/lvconvert.c +97 -101

297 lines not on this page · raw message