[lvm-devel] dev-mornfall-lvmcache - lvm1: Do not call into lvmcache from low-level code.

Petr Rockai mornfall at fedoraproject.org
Wed Jun 5 12:05:57 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1650e1467ca35e3a4dfece81bcda2e2c23bf046b
Commit:        1650e1467ca35e3a4dfece81bcda2e2c23bf046b
Parent:        94d9562bea6d0fa5bc7e919cb34090ffe6b45fd9
Author:        Petr Rockai <prockai at redhat.com>
AuthorDate:    Mon Feb 18 16:20:20 2013 +0100
Committer:     Petr Rockai <prockai at redhat.com>
CommitterDate: Wed Jun 5 12:37:36 2013 +0200

lvm1: Do not call into lvmcache from low-level code.

This path is not performance-sensitive anyway (LVM1 is long deprecated) and
disk-rep is very low-level code that has no business talking to lvmcache.
---
 lib/format1/disk-rep.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/lib/format1/disk-rep.c b/lib/format1/disk-rep.c
index 19776e0..adc38ba 100644
--- a/lib/format1/disk-rep.c
+++ b/lib/format1/disk-rep.c
@@ -493,24 +493,6 @@ int read_pvs_in_vg(const struct format_type *fmt, const char *vg_name,
 	baton.mem = mem;
 	baton.vg_name = vg_name;
 
-	/* Fast path if we already saw this VG and cached the list of PVs */
-	if (vg_name && (vginfo = lvmcache_vginfo_from_vgname(vg_name, NULL))) {
-
-		lvmcache_foreach_pv(vginfo, _read_pv_in_vg, &baton);
-
-		if (!baton.empty) {
-			/* Did we find the whole VG? */
-			if (!vg_name || is_orphan_vg(vg_name) ||
-			    (baton.data && *baton.data->pvd.vg_name &&
-			     dm_list_size(head) == baton.data->vgd.pv_cur))
-				return 1;
-
-			/* Failed */
-			dm_list_init(head);
-			/* vgcache_del(vg_name); */
-		}
-	}
-
 	if (!(iter = dev_iter_create(filter, 1))) {
 		log_error("read_pvs_in_vg: dev_iter_create failed");
 		return 0;




More information about the lvm-devel mailing list