All of lore.kernel.org
 help / color / mirror / Atom feed
From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/scripts gdbinit
Date: 1 Sep 2011 21:01:12 -0000	[thread overview]
Message-ID: <20110901210112.8299.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	jbrassow at sourceware.org	2011-09-01 21:01:12

Modified files:
	scripts        : gdbinit 

Log message:
	Updates to gdbinit file
	
	1) Add more status flags for printing
	2) Fix bug in lv_status_r processing for mirror segment type

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/gdbinit.diff?cvsroot=lvm2&r1=1.7&r2=1.8

--- LVM2/scripts/gdbinit	2011/07/01 16:15:25	1.7
+++ LVM2/scripts/gdbinit	2011/09/01 21:01:12	1.8
@@ -27,8 +27,8 @@
 printf "Use 'help <command>' for more info\n"
 printf "\n\n"
 printf "Popular breakpoints:\n"
-printf "break lv_raid_change_image_count\n"
-printf "run -m1 vg/lv\n"
+printf "break _split_mirror_images\n"
+printf "run --splitmirrors 2 -n new vg/lv\n"
 printf "\n\n"
 
 set follow-fork-mode child
@@ -114,7 +114,7 @@
 	set $_SMI_seg  = (struct lv_segment *)$arg1
 	set $_SMI_index= $arg2
 
-	if ($_SMI_index < $_SMI_seg->area_count)
+	if (($_SMI_index < $_SMI_seg->area_count) && $_SMI_seg->meta_areas)
 		set $_SMI_area = $_SMI_seg->meta_areas[$_SMI_index]
 		set $_SMI_type = $_SMI_area.type
 
@@ -174,6 +174,21 @@
 
 #	Constants defined in metadata-exported.h
 
+#	if ($_s_status & RAID)
+	if ($_s_status & 0x00000001U)
+		set $_s_status = $_s_status & ~0x00000001U
+		printf " RAID"
+	end
+#	if ($_s_status & RAID_META)
+	if ($_s_status & 0x00000002U)
+		set $_s_status = $_s_status & ~0x00000002U
+		printf " RAID_META"
+	end
+#	if ($_s_status & RAID_IMAGE)
+	if ($_s_status & 0x00000004U)
+		set $_s_status = $_s_status & ~0x00000004U
+		printf " RAID_IMAGE"
+	end
 #	if ($_s_status & VISIBLE_LV)
 	if ($_s_status & 0x00000040U)
 		printf " VISIBLE_LV"
@@ -186,6 +201,16 @@
 		set $_s_status = $_s_status & ~0x00000080U
 		printf " FIXED_MINOR"
 	end
+#	if ($_s_status & LVM_READ)
+	if ($_s_status & 0x00000100U)
+		set $_s_status = $_s_status & ~0x00000100U
+		printf " LVM_READ"
+	end
+#	if ($_s_status & LVM_WRITE)
+	if ($_s_status & 0x00000200U)
+		set $_s_status = $_s_status & ~0x00000200U
+		printf " LVM_WRITE"
+	end
 #	if ($_s_status & SNAPSHOT)
 	if ($_s_status & 0x00001000U)
 		set $_s_status = $_s_status & ~0x00001000U
@@ -216,21 +241,6 @@
 		set $_s_status = $_s_status & ~0x00040000U
 		printf " MIRROR_IMAGE"
 	end
-#	if ($_s_status & RAID)
-	if ($_s_status & 0x00000001U)
-		set $_s_status = $_s_status & ~0x00000001U
-		printf " RAID"
-	end
-#	if ($_s_status & RAID_META)
-	if ($_s_status & 0x00000002U)
-		set $_s_status = $_s_status & ~0x00000002U
-		printf " RAID_META"
-	end
-#	if ($_s_status & RAID_IMAGE)
-	if ($_s_status & 0x00000004U)
-		set $_s_status = $_s_status & ~0x00000004U
-		printf " RAID_IMAGE"
-	end
 #	if ($_s_status & LV_NOTSYNCED)
 	if ($_s_status & 0x00080000U)
 		set $_s_status = $_s_status & ~0x00080000U
@@ -241,15 +251,10 @@
 		set $_s_status = $_s_status & ~0x00400000U
 		printf " CONVERTING"
 	end
-#	if ($_s_status & LVM_READ)
-	if ($_s_status & 0x00000100U)
-		set $_s_status = $_s_status & ~0x00000100U
-		printf " LVM_READ"
-	end
-#	if ($_s_status & LVM_WRITE)
-	if ($_s_status & 0x00000200U)
-		set $_s_status = $_s_status & ~0x00000200U
-		printf " LVM_WRITE"
+#	if ($_s_status & MERGING)
+	if ($_s_status & 0x10000000U)
+		set $_s_status = $_s_status & ~0x10000000U
+		printf " MERGING"
 	end
 
 	if ($_s_status)
@@ -417,7 +422,9 @@
 # __lv_status_r <LV>
 # Decend tree, printing LV and seg status as we go.  This
 # performs a depth first approach (but can't come up) 
+#
 # or
+#
 # __lv_status_r <sub_lv> <seg using sub_lv>
 # Try continuing decent of tree by first shifting to the
 # next 'area' in the seg ($arg1).  If no more areas, then
@@ -464,7 +471,6 @@
 		if (!$_area_index)
 			seg_status $_seg $indent
 		end
-
 		__seg_type $_type $_seg $_area_index
 		if ($_type == AREA_LV)
 			set $indent++



             reply	other threads:[~2011-09-01 21:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01 21:01 jbrassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-10 23:24 LVM2/scripts gdbinit jbrassow
2011-09-28 16:32 jbrassow
2011-09-13 13:57 jbrassow
2011-09-08 22:19 jbrassow
2011-07-01 16:15 jbrassow
2011-03-29 12:53 jbrassow
2011-03-14 18:05 jbrassow
2011-03-11 22:25 jbrassow
2011-03-11 22:16 jbrassow
2011-03-11 18:22 jbrassow
2011-03-10 13:45 jbrassow

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=20110901210112.8299.qmail@sourceware.org \
    --to=jbrassow@sourceware.org \
    --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.