From bde9375fac3dbdac12c5dc31255e4123ea0ba4d6 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Thu, 31 Oct 2013 12:13:14 +0100
Subject: [PATCH 102/212] rbd: Only look for qemu-specific copy of librbd.so.1

RH-Author: Kevin Wolf <kwolf@redhat.com>
Message-id: <1383221595-24285-3-git-send-email-kwolf@redhat.com>
Patchwork-id: 55184
O-Subject: [RHEL-7.0 qemu-kvm PATCH 2/3] rbd: Only look for qemu-specific copy of librbd.so.1
Bugzilla: 989608
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Fam Zheng <famz@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>

Bugzilla: 989608
Upstream status: n/a
Downstream status: Forward ported from RHEL 6

For non-technical reasons, we don't want to pick up a random librbd that
may be installed for other reasons on this system, but only a librbd
that was specificially installed in order to consciously extend qemu.

So change the gmodule_open() argument to an absolute path.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 block/rbd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/rbd.c b/block/rbd.c
index 8fdd04d..75db2e7 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -1056,7 +1056,7 @@ static int qemu_rbd_load_libs(void)
         return -1;
     }
 
-    librbd_handle = g_module_open("librbd.so.1", 0);
+    librbd_handle = g_module_open("/usr/lib64/qemu/librbd.so.1", 0);
     if (!librbd_handle) {
         error_report("error loading librbd: %s", g_module_error());
         return -1;
-- 
1.7.1

