[PVFS2-CVS] commit by neill in pvfs2/src/server: crdirent.sm create.sm mkdir.sm pvfs2-server.c remove.sm set-attr.sm setparam.sm

CVS commit program cvs at parl.clemson.edu
Mon Feb 16 18:08:22 EST 2004


Update of /projects/cvsroot/pvfs2/src/server
In directory parlweb:/tmp/cvs-serv1189/src/server

Modified Files:
	crdirent.sm create.sm mkdir.sm pvfs2-server.c remove.sm 
	set-attr.sm setparam.sm 
Log Message:
- extend the job interface to take a flags argument, which is passed to various
  trove operations, rather than hard-coding TROVE_SYNC
- make changes to server to pass in the mode value matching the config option
- update test programs (hardcode TROVE_SYNC)


Index: crdirent.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/crdirent.sm,v
diff -p -u -r1.30 -r1.31
--- crdirent.sm	30 Jan 2004 20:12:13 -0000	1.30
+++ crdirent.sm	16 Feb 2004 23:08:22 -0000	1.31
@@ -261,6 +261,7 @@ static int crdirent_create_dirdata_dspac
     job_id_t i;
     PVFS_handle_extent extent;
     PVFS_handle_extent_array extent_array;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     PINT_STATE_DEBUG("create_dirdata_dspace");
 
@@ -273,15 +274,19 @@ static int crdirent_create_dirdata_dspac
     extent_array.extent_count = 1;
     extent_array.extent_array = &extent;
 
-    ret = job_trove_dspace_create(s_op->req->u.crdirent.fs_id,
-                                  &extent_array,
-                                  PVFS_TYPE_DIRDATA,
-                                  NULL,
-                                  s_op,
-                                  0,
-                                  js_p,
-                                  &i,
-                                  server_job_context);
+    ret = job_trove_dspace_create(
+        s_op->req->u.crdirent.fs_id,
+        &extent_array,
+        PVFS_TYPE_DIRDATA,
+        NULL,
+        PINT_config_get_trove_sync_mode(
+            user_opts, s_op->req->u.crdirent.fs_id),
+        s_op,
+        0,
+        js_p,
+        &i,
+        server_job_context);
+
     return ret;
 }
 

Index: create.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/create.sm,v
diff -p -u -r1.32 -r1.33
--- create.sm	30 Jan 2004 20:12:13 -0000	1.32
+++ create.sm	16 Feb 2004 23:08:22 -0000	1.33
@@ -16,7 +16,6 @@ static int create_cleanup(PINT_server_op
 static int create_create(PINT_server_op *s_op, job_status_s* js_p);
 static int create_setup_resp(PINT_server_op *s_op, job_status_s* js_p);
 
-
 %%
 
 machine pvfs2_create_sm(prelude, create2, setup_resp, final_response, cleanup)
@@ -75,6 +74,7 @@ static int create_create(PINT_server_op 
 
     int ret = -1;
     job_id_t i;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     PINT_STATE_DEBUG("create");
 
@@ -83,6 +83,8 @@ static int create_create(PINT_server_op 
         &s_op->req->u.create.handle_extent_array,
         s_op->req->u.create.object_type,
         NULL,
+        PINT_config_get_trove_sync_mode(
+            user_opts, s_op->req->u.create.fs_id),
         s_op,
         0,
         js_p,

Index: mkdir.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/mkdir.sm,v
diff -p -u -r1.32 -r1.33
--- mkdir.sm	30 Jan 2004 20:12:13 -0000	1.32
+++ mkdir.sm	16 Feb 2004 23:08:22 -0000	1.33
@@ -87,6 +87,7 @@ static int mkdir_create(PINT_server_op *
 
     int ret;
     job_id_t i;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     gossip_debug(GOSSIP_SERVER_DEBUG, "mkdir state: create\n");
 
@@ -102,6 +103,8 @@ static int mkdir_create(PINT_server_op *
         &s_op->req->u.mkdir.handle_extent_array,
         PVFS_TYPE_DIRECTORY,
         NULL,
+        PINT_config_get_trove_sync_mode(
+            user_opts, s_op->req->u.mkdir.fs_id),
         s_op,
         0,
         js_p,
@@ -129,6 +132,7 @@ static int mkdir_setattrib(PINT_server_o
     job_id_t j_id;
     PVFS_object_attr *a_p = NULL;
     PVFS_ds_attributes *ds_attr = NULL;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     PINT_STATE_DEBUG("setattrib");
 
@@ -146,7 +150,9 @@ static int mkdir_setattrib(PINT_server_o
 
     ret = job_trove_dspace_setattr(
         s_op->req->u.mkdir.fs_id, s_op->resp.u.mkdir.handle,
-        ds_attr, s_op, 0, js_p, &j_id, server_job_context);
+        ds_attr, PINT_config_get_trove_sync_mode(
+            user_opts, s_op->req->u.mkdir.fs_id),
+        s_op, 0, js_p, &j_id, server_job_context);
 
     return(ret);
 }

Index: pvfs2-server.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/pvfs2-server.c,v
diff -p -u -r1.138 -r1.139
--- pvfs2-server.c	16 Feb 2004 22:00:01 -0000	1.138
+++ pvfs2-server.c	16 Feb 2004 23:08:22 -0000	1.139
@@ -688,6 +688,11 @@ static int server_initialize_subsystems(
                 GOSSIP_SERVER_DEBUG, "File system %s using handles: %s\n",
                 cur_fs->file_system_name, cur_merged_handle_range);
 
+	    gossip_debug(GOSSIP_SERVER_DEBUG, "Sync mode for %s is %s\n",
+                         cur_fs->file_system_name,
+                         ((cur_fs->trove_sync_mode == TROVE_SYNC) ?
+                          "sync" : "nosync"));
+
             trove_close_context(cur_fs->coll_id, trove_context);
             free(cur_merged_handle_range);
         }

Index: remove.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/remove.sm,v
diff -p -u -r1.32 -r1.33
--- remove.sm	16 Feb 2004 20:17:11 -0000	1.32
+++ remove.sm	16 Feb 2004 23:08:22 -0000	1.33
@@ -264,6 +264,7 @@ static int remove_remove_dirdata_dspace(
 {
     int ret;
     job_id_t j_id;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     PINT_STATE_DEBUG("remove_dirdata_dspace");
 
@@ -274,6 +275,8 @@ static int remove_remove_dirdata_dspace(
     ret = job_trove_dspace_remove(
         s_op->req->u.remove.fs_id,
         s_op->u.remove.dirdata_handle,
+        PINT_config_get_trove_sync_mode(
+            user_opts, s_op->req->u.remove.fs_id),
         s_op,
         0,
         js_p,
@@ -294,12 +297,15 @@ static int remove_remove_dspace(PINT_ser
 {
     int ret;
     job_id_t j_id;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     PINT_STATE_DEBUG("remove_dspace");
 
     ret = job_trove_dspace_remove(
         s_op->req->u.remove.fs_id,
         s_op->req->u.remove.handle,
+        PINT_config_get_trove_sync_mode(
+            user_opts, s_op->req->u.remove.fs_id),
         s_op,
         0,
         js_p,

Index: set-attr.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/set-attr.sm,v
diff -p -u -r1.43 -r1.44
--- set-attr.sm	30 Jan 2004 20:12:13 -0000	1.43
+++ set-attr.sm	16 Feb 2004 23:08:22 -0000	1.44
@@ -7,6 +7,7 @@
 #include <string.h>
 #include <assert.h>
 
+#include "server-config.h"
 #include "pvfs2-server.h"
 #include "pvfs2-attr.h"
 
@@ -249,6 +250,7 @@ static int setattr_setobj_attribs(PINT_s
     PVFS_object_attr *a_p = NULL;
     PVFS_object_attr *dspace_a_p = NULL;
     PVFS_ds_attributes *ds_attr = NULL;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     PINT_STATE_DEBUG("setobj_attribs");
 
@@ -322,8 +324,11 @@ static int setattr_setobj_attribs(PINT_s
 
     ret = job_trove_dspace_setattr(
         s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle,
-        ds_attr, s_op, 0 /* status tag */, js_p, &j_id,
+        ds_attr, PINT_config_get_trove_sync_mode(
+            user_opts, s_op->req->u.setattr.fs_id),
+        s_op, 0 /* status tag */, js_p, &j_id,
         server_job_context);
+
     return ret;
 }
 

Index: setparam.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/setparam.sm,v
diff -p -u -r1.14 -r1.15
--- setparam.sm	12 Feb 2004 18:05:05 -0000	1.14
+++ setparam.sm	16 Feb 2004 23:08:22 -0000	1.15
@@ -11,6 +11,7 @@
 #include <fcntl.h>
 #include <assert.h>
 
+#include "server-config.h"
 #include "pvfs2-server.h"
 #include "pint-event.h"
 
@@ -63,6 +64,7 @@ static int setparam_work(PINT_server_op 
     int old_event_on;
     int32_t old_api_mask;
     int32_t old_op_mask;
+    struct server_configuration_s *user_opts = get_server_config_struct();
 
     PINT_STATE_DEBUG("work");
 
@@ -89,6 +91,8 @@ static int setparam_work(PINT_server_op 
 	    ret = job_trove_dspace_verify(
                 s_op->req->u.mgmt_setparam.fs_id,
 		(PVFS_handle)s_op->req->u.mgmt_setparam.value,
+                PINT_config_get_trove_sync_mode(
+                    user_opts, s_op->req->u.mgmt_setparam.fs_id),
 		s_op,
 		0,
 		js_p,



More information about the PVFS2-CVS mailing list