From 3456ca0da189db41ea90b0a65d1a7de0304319dc Mon Sep 17 00:00:00 2001
From: bobijam <bobijam>
Date: Thu, 24 Apr 2008 01:18:19 +0000
Subject: [PATCH] Branch HEAD b=15191 i=wangdi, shadow

during liblustre test during

mgc_llog_init() (lustre/mgc/libmgc.c)
  llog_initiator_connect(ctxt)

while in liblustre lib, it is defined as an empty function only return 0, while
in kernel lib, it set the context's loc_imp. And this context's loc_imp is
required after in llog_client_create().

This fix defines llog_initiator_connect() in both lib (kernel version and
liblustre version)
---
 lustre/ptlrpc/llog_net.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/lustre/ptlrpc/llog_net.c b/lustre/ptlrpc/llog_net.c
index a1c54fcdb6..772f93756d 100644
--- a/lustre/ptlrpc/llog_net.c
+++ b/lustre/ptlrpc/llog_net.c
@@ -130,6 +130,16 @@ int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp)
 }
 EXPORT_SYMBOL(llog_receptor_accept);
 
+#else /* !__KERNEL__ */
+
+int llog_origin_connect(struct llog_ctxt *ctxt, int count,
+                        struct llog_logid *logid, struct llog_gen *gen,
+                        struct obd_uuid *uuid)
+{
+        return 0;
+}
+#endif
+
 int llog_initiator_connect(struct llog_ctxt *ctxt)
 {
         struct obd_import *new_imp;
@@ -143,18 +153,3 @@ int llog_initiator_connect(struct llog_ctxt *ctxt)
         RETURN(0);
 }
 EXPORT_SYMBOL(llog_initiator_connect);
-
-#else /* !__KERNEL__ */
-
-int llog_origin_connect(struct llog_ctxt *ctxt, int count,
-                        struct llog_logid *logid, struct llog_gen *gen,
-                        struct obd_uuid *uuid)
-{
-        return 0;
-}
-
-int llog_initiator_connect(struct llog_ctxt *ctxt)
-{
-        return 0;
-}
-#endif
-- 
GitLab