[PVFS2-CVS] commit by pcarns in pvfs2/src/server: pvfs2-server.c pvfs2-server.h

CVS commit program cvs at parl.clemson.edu
Thu Jul 8 18:21:51 EDT 2004


Update of /projects/cvsroot/pvfs2/src/server
In directory parlweb:/tmp/cvs-serv14058/src/server

Modified Files:
	pvfs2-server.c pvfs2-server.h 
Log Message:
initialize cached config interface in the server; convenient for future user
in resolving addresses during inter-server communication


Index: pvfs2-server.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/pvfs2-server.c,v
diff -p -u -r1.153 -r1.154
--- pvfs2-server.c	17 May 2004 21:02:58 -0000	1.153
+++ pvfs2-server.c	8 Jul 2004 21:21:51 -0000	1.154
@@ -41,6 +41,7 @@
 #include "pint-event.h"
 #include "id-generator.h"
 #include "job-time-mgr.h"
+#include "pint-cached-config.h"
 
 #ifndef PVFS2_VERSION
 #define PVFS2_VERSION "Unknown"
@@ -610,6 +611,13 @@ static int server_initialize_subsystems(
 
     *server_status_flag |= SERVER_TROVE_INIT;
 
+    ret = PINT_cached_config_initialize();
+    if(ret < 0)
+    {
+	gossip_err("Error initializing cached_config interface.\n");
+	return(ret);
+    }
+
     cur = server_config.file_systems;
     while(cur)
     {
@@ -618,6 +626,14 @@ static int server_initialize_subsystems(
         {
             break;
         }
+
+	ret = PINT_handle_load_mapping(&server_config, cur_fs);
+	if(ret)
+	{
+	    PVFS_perror("PINT_handle_load_mapping", ret);
+	    return(ret);
+	}
+
         ret = trove_collection_lookup(cur_fs->file_system_name,
                                       &(cur_fs->coll_id),
 				      NULL,
@@ -751,6 +767,8 @@ static int server_initialize_subsystems(
         cur = PINT_llist_next(cur);
     }
 
+    *server_status_flag |= SERVER_CACHED_CONFIG_INIT;
+
     gossip_debug(GOSSIP_SERVER_DEBUG,
                  "Storage Init Complete (%s)\n", SERVER_STORAGE_MODE);
     gossip_debug(GOSSIP_SERVER_DEBUG, "%d filesystem(s) initialized\n",
@@ -927,6 +945,14 @@ static int server_shutdown(
 	PINT_state_machine_halt();
         gossip_debug(GOSSIP_SERVER_DEBUG, "done.\n");
     }
+
+    if (status & SERVER_CACHED_CONFIG_INIT)
+    {
+	gossip_debug(GOSSIP_SERVER_DEBUG, "* halting cached_config interface ... ");
+	PINT_cached_config_finalize();
+	gossip_debug(GOSSIP_SERVER_DEBUG, "done.\n");
+    }
+
 
     if (status & SERVER_EVENT_INIT)
     {

Index: pvfs2-server.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/pvfs2-server.h,v
diff -p -u -r1.86 -r1.87
--- pvfs2-server.h	17 May 2004 19:48:27 -0000	1.86
+++ pvfs2-server.h	8 Jul 2004 21:21:51 -0000	1.87
@@ -77,6 +77,7 @@ typedef enum
     SERVER_EVENT_INIT          = (1 << 14),
     SERVER_JOB_TIME_MGR_INIT   = (1 << 15),
     SERVER_DIST_INIT           = (1 << 16),
+    SERVER_CACHED_CONFIG_INIT  = (1 << 17),
 } PINT_server_status_flag;
 
 /* struct PINT_server_lookup_op



More information about the PVFS2-CVS mailing list