public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: agk@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/cache/lvmcache.c lib/cach ...
Date: Mon, 14 Apr 2008 19:24:00 -0000	[thread overview]
Message-ID: <20080414192417.1011.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2008-04-14 19:24:16

Modified files:
	.              : WHATS_NEW 
	lib/cache      : lvmcache.c lvmcache.h 

Log message:
	Don't store fid in VG metadata cache to avoid clvmd segfault. (2.02.34)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.847&r2=1.848
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.h.diff?cvsroot=lvm2&r1=1.20&r2=1.21

--- LVM2/WHATS_NEW	2008/04/10 21:38:52	1.847
+++ LVM2/WHATS_NEW	2008/04/14 19:24:15	1.848
@@ -1,5 +1,6 @@
 Version 2.02.35 - 
 =================================
+  Don't store fid in VG metadata cache to avoid clvmd segfault. (2.02.34)
   Update vgsplit tests to verify loosening of active LV restriction.
   Update vgsplit to only restrict split with active LVs involved in split.
   Add lv_is_active() to determine whether an lv is active.
--- LVM2/lib/cache/lvmcache.c	2008/04/08 12:49:20	1.43
+++ LVM2/lib/cache/lvmcache.c	2008/04/14 19:24:15	1.44
@@ -63,7 +63,6 @@
 	dm_free(vginfo->vgmetadata);
 
 	vginfo->vgmetadata = NULL;
-	vginfo->fid = NULL;
 
 	log_debug("Metadata cache: VG %s wiped.", vginfo->vgname);
 }
@@ -81,7 +80,6 @@
 		return;
 	}
 
-	vginfo->fid = vg->fid;
 	vginfo->precommitted = precommitted;
 
 	log_debug("Metadata cache: VG %s stored (%d bytes%s).", vginfo->vgname,
@@ -400,6 +398,7 @@
 {
 	struct lvmcache_vginfo *vginfo;
 	struct volume_group *vg;
+	struct format_instance *fid;
 
 	if (!vgid || !(vginfo = vginfo_from_vgid(vgid)) || !vginfo->vgmetadata)
 		return NULL;
@@ -411,7 +410,12 @@
 	    (!precommitted && vginfo->precommitted))
 		return NULL;
 
-	if (!(vg = import_vg_from_buffer(vginfo->vgmetadata, vginfo->fid)) ||
+	fid =  vginfo->fmt->ops->create_instance(vginfo->fmt, vginfo->vgname,
+						 vgid, NULL);
+	if (!fid)
+		return NULL;
+
+	if (!(vg = import_vg_from_buffer(vginfo->vgmetadata, fid)) ||
 	    !vg_validate(vg)) {
 		_free_cached_vgmetadata(vginfo);
 		return_NULL;
--- LVM2/lib/cache/lvmcache.h	2008/04/08 12:49:20	1.20
+++ LVM2/lib/cache/lvmcache.h	2008/04/14 19:24:16	1.21
@@ -45,7 +45,6 @@
 	struct lvmcache_vginfo *next; /* Another VG with same name? */
 	char *creation_host;
 	char *vgmetadata;	/* Copy of VG metadata as format_text string */
-	struct format_instance *fid;	/* fid associated with vgmetadata */
 	unsigned precommitted;	/* Is vgmetadata live or precommitted? */
 };
 


             reply	other threads:[~2008-04-14 19:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14 19:24 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-11 17:24 zkabelac
2011-06-01 19:29 agk
2011-03-30 13:14 zkabelac
2011-01-10 13:15 zkabelac
2011-01-10 13:13 zkabelac
2010-12-10 22:40 agk
2010-03-17  2:11 agk
2010-03-16 17:30 agk
2010-03-16 16:57 agk
2010-02-03 14:08 prajnoha
2009-09-02 21:34 wysochanski
2008-04-08 12:49 agk
2008-04-01 22:40 agk
2008-02-06 15:47 agk
2008-01-29 23:45 agk
2006-04-13 21:08 agk
2006-04-13 17:32 agk
2006-04-12 21:23 agk
2006-04-12 17:54 agk
2006-04-11 17:42 agk
2006-04-11 13:56 agk

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=20080414192417.1011.qmail@sourceware.org \
    --to=agk@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).