[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/server: pvfs2-server.c

CVS commit program cvs at parl.clemson.edu
Thu Feb 21 09:34:35 EST 2008


Update of /projects/cvsroot/pvfs2-1/src/server
In directory parlweb1:/tmp/cvs-serv3393/src/server

Modified Files:
      Tag: small-file-branch
	pvfs2-server.c 
Log Message:
Make precreate pools safe for split io server / meta server configurations.
Only meta servers are supposed to spool up precreated handles.


Index: pvfs2-server.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/server/pvfs2-server.c,v
diff -p -u -r1.246.6.9 -r1.246.6.10
--- pvfs2-server.c	21 Feb 2008 02:10:22 -0000	1.246.6.9
+++ pvfs2-server.c	21 Feb 2008 14:34:34 -0000	1.246.6.10
@@ -1958,8 +1958,6 @@ static int precreate_pool_initialize(voi
     int server_type;
     int handle_count;
 
-    /* TODO: check if I am a meta server; if not bail out! */
-
     /* iterate through list of file systems */
     while(cur_f)
     {
@@ -1969,6 +1967,25 @@ static int precreate_pool_initialize(voi
             break;
         }
 
+        /* am I a meta server in this file system? */
+        ret = PINT_cached_config_check_type(
+            cur_fs->coll_id,
+            server_config.host_id,
+            &server_type);
+        if(ret < 0)
+        {
+            /* TODO: handle properly */
+            return(ret);
+        }
+        if(!(server_type & PINT_SERVER_TYPE_META))
+        {
+            /* This server is not a meta server for this file system; 
+             * skip doing any precreate setup steps.
+             */
+            cur_f = PINT_llist_next(cur_f);
+            continue;
+        }
+
         /* how many I/O servers do we have? */
         ret = PINT_cached_config_count_servers(
             cur_fs->coll_id, PINT_SERVER_TYPE_IO, &server_count);
@@ -2117,7 +2134,7 @@ static int precreate_pool_setup_server(c
             fsid, server_config.host_id, PINT_SERVER_TYPE_META, &ext_array);
         if(ret < 0)
         {
-            gossip_err("Error: PINT_cached_condig_get_meta() failure.\n");
+            gossip_err("Error: PINT_cached_config_get_meta() failure.\n");
             free(key.buffer);
             return(ret);
         }



More information about the Pvfs2-cvs mailing list