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

CVS commit program cvs at parl.clemson.edu
Mon Feb 25 10:38:13 EST 2008


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

Modified Files:
      Tag: small-file-branch
	job.c 
Log Message:
another trivial error case


Index: job.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/io/job/job.c,v
diff -p -u -r1.177.2.15 -r1.177.2.16
--- job.c	25 Feb 2008 15:26:10 -0000	1.177.2.15
+++ job.c	25 Feb 2008 15:38:12 -0000	1.177.2.16
@@ -4586,8 +4586,24 @@ static void precreate_pool_fill_thread_m
     
     trove_pending_count++;
 
-    /* TODO: what to do here?  Do we unwind or what? */
-    assert(ret >=0);
+    if(ret < 0)
+    {
+        gossip_err("Error: unable to write all precreated handles to pool.\n");
+        gossip_err("Warning: fsck may be needed to recover stranded handles.\n");
+        gen_mutex_lock(&completion_mutex);
+
+        /* set job descriptor fields and put into completion queue */
+        jd->u.precreate_pool.error_code = ret;
+        job_desc_q_add(completion_queue_array[jd->context_id], jd);
+        /* set completed flag while holding queue lock */
+        jd->completed_flag = 1;
+#ifdef __PVFS2_JOB_THREADED__
+        /* wake up anyone waiting for completion */
+        pthread_cond_signal(&completion_cond);
+#endif
+        gen_mutex_unlock(&completion_mutex);
+        return;
+    }
 
     if(ret == 1)
     {



More information about the Pvfs2-cvs mailing list