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

CVS commit program cvs at parl.clemson.edu
Tue Feb 12 10:06:12 EST 2008


Update of /projects/cvsroot/pvfs2-1/src/io/job
In directory parlweb1:/tmp/cvs-serv26846/src/io/job

Modified Files:
      Tag: small-file-branch
	job.c 
Log Message:
Added support for specifying specific server layout in get_handles()
interface.  Also added commented out code block in setparam to test usage


Index: job.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/io/job/job.c,v
diff -p -u -r1.177.2.8 -r1.177.2.9
--- job.c	11 Feb 2008 19:59:21 -0000	1.177.2.8
+++ job.c	12 Feb 2008 15:06:12 -0000	1.177.2.9
@@ -5243,6 +5243,7 @@ static void precreate_pool_get_post_next
     TROVE_op_id tmp_id;
     int ret;
     struct precreate_pool_get_trove* tmp_trove;
+    struct qlist_head* iterator;
 
     /* we better still have handles to retrieve */
     assert(jd->u.precreate_pool.precreate_handle_index < 
@@ -5256,9 +5257,27 @@ static void precreate_pool_get_post_next
     {
         if(jd->u.precreate_pool.servers)
         {
-            /* caller wanted specific servers */
-            /* TODO: implement this */
-            assert(0);
+            /* caller wanted specific servers ; search through list and 
+             * set current pool to appropriate entry for this server
+             */
+            jd->u.precreate_pool.current_pool = NULL; /* sentinal */
+            qlist_for_each(iterator, &precreate_pool_list)
+            {
+                pool = qlist_entry(iterator, struct precreate_pool,
+                    list_link);
+                if(!strcmp(pool->host, jd->u.precreate_pool.servers[jd->u.precreate_pool.precreate_handle_index]))
+                {
+                    jd->u.precreate_pool.current_pool = iterator;
+                    break;
+                }
+            }
+            if(!jd->u.precreate_pool.current_pool)
+            {
+                /* TODO: figure out what to do with this.  Someone gave us
+                 * bad args but we are late detecting it
+                 */
+                assert(0);
+            }
         }
         else
         {



More information about the Pvfs2-cvs mailing list