From e766d6516dc5adf527429e3e7c25c2e4172bb1b5 Mon Sep 17 00:00:00 2001
From: Mike Hibler <hibler@cs.utah.edu>
Date: Thu, 7 Aug 2014 17:13:10 -0600
Subject: [PATCH] Add more qualification to storageconfig query.

It was returning info for blockstores of the same name in different
experiments...oops!
---
 tmcd/tmcd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tmcd/tmcd.c b/tmcd/tmcd.c
index 3b40398894..210cdb66da 100644
--- a/tmcd/tmcd.c
+++ b/tmcd/tmcd.c
@@ -4413,9 +4413,11 @@ COMMAND_PROTOTYPE(dostorageconfig)
 	res = mydb_query("select rb.bsidx, r.vname, rb.vname, rb.size "
 			 "from reserved_blockstores as rb "
 			 " left join reserved as r "
-			 "  on r.node_id = rb.vnode_id "
+			 "  on r.node_id = rb.vnode_id and "
+			 "     r.exptidx = rb.exptidx "
 			 " left join virt_lans as vl "
-			 "  on r.vname = vl.vnode "
+			 "  on r.vname = vl.vnode and "
+			 "     r.exptidx = vl.exptidx "
 			 "where vl.vname in (%s) "
 			 " and vl.pid='%s' and vl.eid='%s'",
 			 4, buf, reqp->pid, reqp->eid);
-- 
GitLab