Whamcloud - gitweb
* move recover.c from llite to ptlrpc
authorrread <rread>
Tue, 3 Sep 2002 23:09:48 +0000 (23:09 +0000)
committerrread <rread>
Tue, 3 Sep 2002 23:09:48 +0000 (23:09 +0000)
lustre/include/linux/lustre_ha.h
lustre/lib/l_net.c
lustre/llite/Makefile.am
lustre/llite/super.c
lustre/ptlrpc/Makefile.am
lustre/ptlrpc/recover.c [moved from lustre/llite/recover.c with 98% similarity]
lustre/ptlrpc/rpc.c

index 8095804..3866179 100644 (file)
@@ -44,4 +44,6 @@ int recovd_cleanup(struct recovd_obd *mgr);
 
 extern struct recovd_obd *ptlrpc_recovd;
 
+int ll_recover(struct recovd_data *rd, int phase);
+
 #endif
index e0a3dc7..09e66d9 100644 (file)
@@ -163,6 +163,10 @@ int client_obd_connect(struct lustre_handle *conn, struct obd_device *obd,
         request->rq_connection->c_level = LUSTRE_CONN_FULL;
         cli->cl_import.imp_handle = *(struct lustre_handle *)request->rq_repmsg;
 
+        recovd_conn_manage(cli->cl_import.imp_connection,
+                           ptlrpc_recovd, ll_recover);
+
+
         EXIT;
 out_req:
         ptlrpc_free_req(request);
index dbdb16a..aae1b6f 100644 (file)
@@ -14,7 +14,7 @@ page.c:
 
 
 LINX=page.c
-llite_SOURCES = dcache.c recover.c commit_callback.c super.c rw.c
+llite_SOURCES = dcache.c commit_callback.c super.c rw.c
 llite_SOURCES += file.c dir.c sysctl.c namei.c symlink.c $(LINX)
 llite_SOURCES += lov_pack.c
 
index 1777fe4..69d9c42 100644 (file)
@@ -131,8 +131,6 @@ static struct super_block * ll_read_super(struct super_block *sb,
                 CERROR("cannot connect to %s: rc = %d\n", mdc, err);
                 GOTO(out_free, sb = NULL);
         }
-        recovd_conn_manage(obd->u.cli.cl_import.imp_connection,
-                           ptlrpc_recovd, ll_recover);
         
 #warning Peter: is this the right place to raise the connection level?
         sbi2mdc(sbi)->cl_import.imp_connection->c_level = LUSTRE_CONN_FULL;
@@ -147,8 +145,6 @@ static struct super_block * ll_read_super(struct super_block *sb,
                 CERROR("cannot connect to %s: rc = %d\n", osc, err);
                 GOTO(out_mdc, sb = NULL);
         }
-        recovd_conn_manage(obd->u.cli.cl_import.imp_connection,
-                           ptlrpc_recovd, ll_recover);
 
         /* XXX: need to store the last_* values somewhere */
         err = mdc_getstatus(&sbi->ll_mdc_conn, &rootfid, &last_committed,
index 4c922ff..89000de 100644 (file)
@@ -9,6 +9,6 @@ MODULE = ptlrpc
 modulefs_DATA = ptlrpc.o
 EXTRA_PROGRAMS = ptlrpc
 
-ptlrpc_SOURCES = recovd.c connection.c rpc.c events.c service.c client.c niobuf.c pack_generic.c
+ptlrpc_SOURCES = recovd.c recover.c connection.c rpc.c events.c service.c client.c niobuf.c pack_generic.c
 
 include $(top_srcdir)/Rules
similarity index 98%
rename from lustre/llite/recover.c
rename to lustre/ptlrpc/recover.c
index 368a893..7e0cf5c 100644 (file)
@@ -23,6 +23,8 @@
 #include <linux/lustre_lite.h>
 #include <linux/lustre_ha.h>
 
+#if 0
+/* FIXME: reference to mdc_getstatus causes dependency problems */
 static int ll_reconnect(struct ll_sb_info *sbi)
 {
         struct ll_fid rootfid;
@@ -49,6 +51,7 @@ static int ll_reconnect(struct ll_sb_info *sbi)
  out_disc:
         return err;
 }
+#endif
 
 static int ll_recover_upcall(struct ptlrpc_connection *conn)
 {
index dad8744..75b70ed 100644 (file)
@@ -165,6 +165,9 @@ EXPORT_SYMBOL(lustre_msg_size);
 EXPORT_SYMBOL(lustre_unpack_msg);
 EXPORT_SYMBOL(lustre_msg_buf);
 
+EXPORT_SYMBOL(ll_recover);
+
+
 MODULE_AUTHOR("Cluster File Systems, Inc <info@clusterfs.com>");
 MODULE_DESCRIPTION("Lustre Request Processor v1.0");
 MODULE_LICENSE("GPL");