[Pvfs2-cvs] commit by slang in pvfs2/src/client/sysint: client-state-machine.h fs-add.sm mgmt-get-config.c sys-io.sm sys-rename.sm

CVS commit program cvs at parl.clemson.edu
Thu Apr 5 11:49:37 EDT 2007


Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb1:/tmp/cvs-serv2726/src/client/sysint

Modified Files:
      Tag: pvfs-2-6-branch
	client-state-machine.h fs-add.sm mgmt-get-config.c sys-io.sm 
	sys-rename.sm 
Log Message:
merge recent fixes from HEAD


Index: client-state-machine.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/client-state-machine.h,v
diff -p -u -r1.165 -r1.165.10.1
--- client-state-machine.h	13 Sep 2006 20:22:47 -0000	1.165
+++ client-state-machine.h	5 Apr 2007 15:49:37 -0000	1.165.10.1
@@ -369,6 +369,7 @@ struct PINT_server_get_config_sm
     uint32_t fs_config_buf_size;
     uint32_t server_config_buf_size;
     int persist_config_buffers;
+    int free_config_flag;
 };
 
 struct PINT_server_fetch_config_sm_state

Index: fs-add.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/fs-add.sm,v
diff -p -u -r1.11.10.1 -r1.11.10.2
--- fs-add.sm	15 Jan 2007 19:46:18 -0000	1.11.10.1
+++ fs-add.sm	5 Apr 2007 15:49:37 -0000	1.11.10.2
@@ -541,7 +541,8 @@ static int fs_add_parent_cleanup(
 
     /* finally, try to add the new config to the server config manager */
     ret = PINT_server_config_mgr_add_config(
-        sm_p->u.get_config.config, sm_p->u.get_config.mntent->fs_id);
+        sm_p->u.get_config.config, sm_p->u.get_config.mntent->fs_id,
+        &sm_p->u.get_config.free_config_flag);
     if (ret < 0)
     {
         PVFS_perror_gossip("PINT_server_config_mgr_add_config failed", ret);
@@ -573,6 +574,11 @@ static int fs_add_final_cleanup(
     else if (js_p->error_code == 0)
     {
         compare_hashes(sm_p, js_p);
+    }
+    if(sm_p->u.get_config.free_config_flag)
+    {
+        PINT_config_release(sm_p->u.get_config.config);
+        free(sm_p->u.get_config.config);
     }
     sm_p->error_code = js_p->error_code;
     sm_p->op_complete = 1;

Index: mgmt-get-config.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-get-config.c,v
diff -p -u -r1.1 -r1.1.6.1
--- mgmt-get-config.c	5 Dec 2006 16:37:55 -0000	1.1
+++ mgmt-get-config.c	5 Apr 2007 15:49:37 -0000	1.1.6.1
@@ -75,6 +75,9 @@ int PVFS_mgmt_get_config(
 
     mntent.fs_id = *fsid;
 
+    mntent.pvfs_fs_name = cur_fs->file_system_name;
+    sm_p->u.get_config.config = config;
+
     sm_p->msgpair.enc_type = cur_fs->encoding;
 
     sm_p->u.get_config.mntent = &mntent;

Index: sys-io.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-io.sm,v
diff -p -u -r1.152 -r1.152.8.1
--- sys-io.sm	26 Sep 2006 03:44:16 -0000	1.152
+++ sys-io.sm	5 Apr 2007 15:49:37 -0000	1.152.8.1
@@ -32,6 +32,7 @@ enum
     IO_NO_DATA = 132,
     IO_DATAFILE_TRANSFERS_COMPLETE,
     IO_RETRY,
+    IO_RETRY_NODELAY,
     IO_GET_DATAFILE_SIZE,
     IO_ANALYZE_SIZE_RESULTS,
     IO_DO_SMALL_IO
@@ -390,7 +391,8 @@ static int io_init(PINT_client_sm *sm_p,
         PVFS_TYPE_METAFILE,
         0);
        
-    if (js_p->error_code == IO_RETRY)
+    if (js_p->error_code == IO_RETRY ||
+        (js_p->error_code == IO_RETRY_NODELAY))
     {
         js_p->error_code = 0;
 
@@ -403,6 +405,13 @@ static int io_init(PINT_client_sm *sm_p,
             return 1;
         }
 
+        if(js_p->error_code == IO_RETRY_NODELAY)
+        {
+            gossip_debug(GOSSIP_IO_DEBUG, "  sys-io retrying without delay.\n");
+            js_p->error_code = 0;
+            return 1;
+        }
+        gossip_debug(GOSSIP_IO_DEBUG, "  sys-io retrying with delay.\n");
         return job_req_sched_post_timer(
             sm_p->msgarray_params.retry_delay, sm_p, 0, js_p, &tmp_id,
             pint_client_sm_context);
@@ -1272,7 +1281,18 @@ static int io_analyze_results(PINT_clien
         gossip_debug(GOSSIP_IO_DEBUG, "Retrying I/O operation "
                      "(attempt number %d)\n", sm_p->u.io.retry_count);
 
-        js_p->error_code = IO_RETRY;
+        if(ret == -BMI_ECANCEL)
+        {
+            /* if we got a BMI cancellation, then it probably indicates a
+             * that a BMI timeout has expired; we should retry without
+             * introducing another delay
+             */
+            js_p->error_code = IO_RETRY_NODELAY;
+        }
+        else
+        {
+            js_p->error_code = IO_RETRY;
+        }
         goto analyze_results_exit;
     }
 

Index: sys-rename.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-rename.sm,v
diff -p -u -r1.51.10.1 -r1.51.10.2
--- sys-rename.sm	13 Dec 2006 19:53:34 -0000	1.51.10.1
+++ sys-rename.sm	5 Apr 2007 15:49:37 -0000	1.51.10.2
@@ -425,19 +425,25 @@ static int rename_lookups_comp_fn(
     gossip_debug(GOSSIP_CLIENT_DEBUG, "lookup[%d] got response %d\n",
                  index, resp_p->status);
 
-    if (resp_p->status != 0)
+    /*
+     * if the index is 1, this failure just means that
+     * the target entry does not already exist, so it's
+     * expected and is not an error.
+     */
+    if(resp_p->status == -PVFS_ENOENT && index == 1)
     {
-        if (index == 1)
-        {
-            /*
-              if the index is 1, this failure just means that
-              the target entry does not already exist, so it's
-              expected and is not an error.
-            */
-            resp_p->status = 0;
-        }
-	return resp_p->status;
+        /* note: don't change the actual resp structure, because the
+         * decoder counts on this to know how to release data structures
+         */
+        return 0;
     }
+
+    if(resp_p->status != 0)
+    {
+        return resp_p->status;
+    }
+
+    /* SUCCESS! */
 
     /*
       stash the refns -- 'old' or 'new' based on index;



More information about the Pvfs2-cvs mailing list