All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Robinson <zxvdr.au@gmail.com>
To: lvm-devel@redhat.com
Subject: [PATCH] s-c-l crashes if LV mirror was created with --corelog
Date: Wed, 22 Aug 2007 13:31:26 +1000	[thread overview]
Message-ID: <46CBAE0E.2000405@gmail.com> (raw)

system-config-lvm crashes if there are mirrored logical volumes created 
with --corelog (BZ 229234). The patch below corrects the problem.

--- lvm_model.py.orig	2007-07-12 00:10:29.000000000 +1000
+++ lvm_model.py	2007-07-15 16:19:50.000000000 +1000
@@ -572,9 +572,10 @@
            if lv.is_mirrored():
              # replace tmp lvs with real one
              # log
-            log_lv = vg.get_lvs()[lv.get_mirror_log()]
-            vg.get_lvs().pop(log_lv.get_name()) # remove log_lv from vg
-            lv.set_mirror_log(log_lv)
+            if lv.get_mirror_log():
+              log_lv = vg.get_lvs()[lv.get_mirror_log()]
+              vg.get_lvs().pop(log_lv.get_name()) # remove log_lv from vg
+              lv.set_mirror_log(log_lv)
              # images
              segment = lv.get_segments()[0]
              images_tmp = segment.get_images()[:] # copy
--- renderer.py.orig	2006-02-08 05:39:07.000000000 +1000
+++ renderer.py		2007-07-19 18:39:45.000000000 +1000
@@ -470,12 +470,13 @@
              # set up mirroring log
              if lv.is_mirrored():
                  log_lv = lv.get_mirror_log()
-                for seg2 in log_lv.get_segments():
-                    # log should have linear mapping only
-                    extent = seg2.get_extent_block()
-                    subcyl = Subcylinder(self.lv_cyl_gen, 1, 0, False, 
extent.get_start_size()[1])
-                    lv_cyls_dir[extent] = subcyl
-                    cyl.children.append(subcyl)
+                if log_lv:
+                   for seg2 in log_lv.get_segments():
+                       # log should have linear mapping only
+                       extent = seg2.get_extent_block()
+                       subcyl = Subcylinder(self.lv_cyl_gen, 1, 0, 
False, extent.get_start_size()[1])
+                       lv_cyls_dir[extent] = subcyl
+                       cyl.children.append(subcyl)

              # set up helper display
              cyl.add_object(CYL_ID_VOLUME, lv)



                 reply	other threads:[~2007-08-22  3:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46CBAE0E.2000405@gmail.com \
    --to=zxvdr.au@gmail.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.