From 8be4038a29f4729e846b3797a7344d22ad3adc28 Mon Sep 17 00:00:00 2001
Message-Id: <8be4038a29f4729e846b3797a7344d22ad3adc28.1376495567.git.minovotn@redhat.com>
In-Reply-To: <00d7e0e572c0fbe3521a2d1ffb6cc704e1abd2eb.1376495567.git.minovotn@redhat.com>
References: <00d7e0e572c0fbe3521a2d1ffb6cc704e1abd2eb.1376495567.git.minovotn@redhat.com>
From: Kevin Wolf <kwolf@redhat.com>
Date: Wed, 14 Aug 2013 08:52:47 +0200
Subject: [PATCH 3/6] rbd: Only look for qemu-specific copy of librbd.so.1

RH-Author: Kevin Wolf <kwolf@redhat.com>
Message-id: <1376470370-32441-4-git-send-email-kwolf@redhat.com>
Patchwork-id: 53331
O-Subject: [RHEL-6.5 qemu-kvm PATCH 3/6] rbd: Only look for qemu-specific copy of librbd.so.1
Bugzilla: 988079
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>

Bugzilla: 988079
Upstream status: n/a

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 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/rbd.c b/block/rbd.c
index ea2cd6b..eb8707a 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -1098,7 +1098,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.11.7

