[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/io/job:
job-desc-queue.h job.c
CVS commit program
cvs at parl.clemson.edu
Mon Feb 25 10:26:11 EST 2008
Update of /projects/cvsroot/pvfs2-1/src/io/job
In directory parlweb1:/tmp/cvs-serv30909
Modified Files:
Tag: small-file-branch
job-desc-queue.h job.c
Log Message:
deal with one of the easier precreate job error cases
Index: job-desc-queue.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/io/job/job-desc-queue.h,v
diff -p -u -r1.26.66.4 -r1.26.66.5
--- job-desc-queue.h 18 Feb 2008 16:18:35 -0000 1.26.66.4
+++ job-desc-queue.h 25 Feb 2008 15:26:10 -0000 1.26.66.5
@@ -59,6 +59,7 @@ struct precreate_pool_desc
const char** servers;
struct qlist_head* current_pool;
int trove_pending;
+ int trove_posted;
int low_threshold;
/* TODO: does this make the job descriptor too big? */
Index: job.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/io/job/job.c,v
diff -p -u -r1.177.2.14 -r1.177.2.15
--- job.c 21 Feb 2008 19:34:56 -0000 1.177.2.14
+++ job.c 25 Feb 2008 15:26:10 -0000 1.177.2.15
@@ -4452,8 +4452,24 @@ static void precreate_pool_fill_thread_m
}
gen_mutex_unlock(&initialized_mutex);
- /* TODO: what to do here? Do we unwind or what? */
- assert(error_code == 0);
+ if(error_code != 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 = error_code;
+ 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(jd->u.precreate_pool.id == PVFS_OP_NULL)
{
@@ -5492,6 +5508,7 @@ static void precreate_pool_get_post_next
tmp_trove->trove_callback.data = tmp_trove;
/* post trove operation to pull out a handle */
+ /* TODO: what if this immediately returns? */
ret = trove_keyval_iterate_keys(
pool->fsid,
pool->pool_handle,
More information about the Pvfs2-cvs
mailing list