[Pvfs2-cvs] commit by elaine in pvfs2/src/server: crdirent.sm
create-file.sm create.sm get-attr.sm prelude.sm
pvfs2-server.h set-attr.sm
CVS commit program
cvs at parl.clemson.edu
Tue Sep 23 13:25:54 EDT 2008
Update of /projects/cvsroot/pvfs2/src/server
In directory parlweb1:/tmp/cvs-serv19180/server
Modified Files:
Tag: cu-sandbox-branch
crdirent.sm create-file.sm create.sm get-attr.sm prelude.sm
pvfs2-server.h set-attr.sm
Log Message:
Index: crdirent.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/crdirent.sm,v
diff -p -u -r1.68.4.2 -r1.68.4.3
--- crdirent.sm 27 May 2008 18:00:53 -0000 1.68.4.2
+++ crdirent.sm 23 Sep 2008 17:25:53 -0000 1.68.4.3
@@ -22,8 +22,36 @@ enum
%%
+machine pvfs2_crdirent_sm
+{
+ state do_work
+ {
+ jump pvfs2_crdirent_work_sm;
+ default => final_response;
+ }
+
+ state final_response
+ {
+ jump pvfs2_final_response_sm;
+ default => cleanup;
+ }
+
+ state cleanup
+ {
+ run crdirent_cleanup;
+ default => terminate;
+ }
+}
+
nested machine pvfs2_crdirent_work_sm
{
+ state prelude
+ {
+ jump pvfs2_prelude_sm;
+ success => validate;
+ default => final_response;
+ }
+
state validate
{
run crdirent_validate;
@@ -66,40 +94,6 @@ nested machine pvfs2_crdirent_work_sm
}
}
-machine pvfs2_crdirent_sm
-{
- state prelude
- {
- jump pvfs2_prelude_sm;
- success => setup_op;
- default => final_response;
- }
-
- state setup_op
- {
- run crdirent_setup_op;
- default => do_work;
- }
-
- state do_work
- {
- jump pvfs2_crdirent_work_sm;
- default => final_response;
- }
-
- state final_response
- {
- jump pvfs2_final_response_sm;
- default => cleanup;
- }
-
- state cleanup
- {
- run crdirent_cleanup;
- default => terminate;
- }
-}
-
%%
/*
@@ -113,8 +107,8 @@ static PINT_sm_action crdirent_validate(
struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
char *ptr = NULL;
- if ((s_op->u.crdirent.name == NULL) ||
- (s_op->u.crdirent.parent_handle == PVFS_HANDLE_NULL))
+ if ((s_op->req->u.crdirent.name == NULL) ||
+ (s_op->req->u.crdirent.handle == PVFS_HANDLE_NULL))
{
js_p->error_code = -PVFS_EINVAL;
return SM_ACTION_COMPLETE;
@@ -122,12 +116,12 @@ static PINT_sm_action crdirent_validate(
gossip_debug(GOSSIP_SERVER_DEBUG,
" got crdirent for %s (with handle %llu) in %llu\n",
- s_op->u.crdirent.name,
- llu(s_op->u.crdirent.new_handle),
- llu(s_op->u.crdirent.parent_handle));
+ s_op->req->u.crdirent.name,
+ llu(s_op->req->u.crdirent.new_handle),
+ llu(s_op->req->u.crdirent.handle));
/* check for invalid characters in name */
- ptr = s_op->u.crdirent.name;
+ ptr = s_op->req->u.crdirent.name;
while (*ptr != '\0' && *ptr != '/' ) ptr++;
if (*ptr != '\0')
@@ -135,7 +129,7 @@ static PINT_sm_action crdirent_validate(
/* found an invalid character -- report it and send error response */
gossip_lerr("crdirent: error: invalid character (%s)"
"in name (%s); sending error response.\n",
- ptr, s_op->u.crdirent.name);
+ ptr, s_op->req->u.crdirent.name);
/* for parity with linux VFS, allow any character except / in
* filenames. */
@@ -167,7 +161,7 @@ static PINT_sm_action crdirent_validate(
* Params: server_op *s_op,
* job_status_s *js_p
*
- * Pre: s_op->u.crdirent.parent_handle is handle of directory
+ * Pre: s_op->req->u.crdirent.handle is handle of directory
*
* Post: s_op->val.buffer is the directory entry k/v space OR NULL
* if first entry
@@ -201,8 +195,8 @@ static PINT_sm_action crdirent_read_dire
s_op->val.buffer_sz = sizeof(PVFS_handle);
ret = job_trove_keyval_read(
- s_op->u.crdirent.fs_id,
- s_op->u.crdirent.parent_handle,
+ s_op->req->u.crdirent.fs_id,
+ s_op->req->u.crdirent.handle,
&s_op->key,
&s_op->val,
0,
@@ -233,8 +227,8 @@ static PINT_sm_action validation_object_
* job_status_s *js_p
*
* Pre: s_op->u.crdirent.dirent_handle is the directory entry k/v space
- * s_op->u.crdirent.name != NULL
- * s_op->u.crdirent.new_handle != NULL
+ * s_op->u.req->crdirent.name != NULL
+ * s_op->u.req->crdirent.new_handle != NULL
*
* Post: key/val pair stored
*
@@ -261,15 +255,15 @@ static PINT_sm_action crdirent_write_dir
*/
/* this is the name for the parent entry */
- s_op->key.buffer = s_op->u.crdirent.name;
- s_op->key.buffer_sz = strlen(s_op->u.crdirent.name) + 1;
+ s_op->key.buffer = s_op->req->u.crdirent.name;
+ s_op->key.buffer_sz = strlen(s_op->req->u.crdirent.name) + 1;
- s_op->val.buffer = &s_op->u.crdirent.new_handle;
+ s_op->val.buffer = &s_op->req->u.crdirent.new_handle;
s_op->val.buffer_sz = sizeof(PVFS_handle);
gossip_debug(GOSSIP_SERVER_DEBUG, " writing new directory entry "
"for %s (handle = %llu) to dirdata dspace %llu\n",
- s_op->u.crdirent.name, llu(s_op->u.crdirent.new_handle),
+ s_op->req->u.crdirent.name, llu(s_op->req->u.crdirent.new_handle),
llu(s_op->u.crdirent.dirent_handle));
keyval_flags = TROVE_SYNC;
@@ -285,7 +279,7 @@ static PINT_sm_action crdirent_write_dir
keyval_flags |= TROVE_KEYVAL_HANDLE_COUNT;
ret = job_trove_keyval_write(
- s_op->u.crdirent.fs_id, s_op->u.crdirent.dirent_handle,
+ s_op->req->u.crdirent.fs_id, s_op->u.crdirent.dirent_handle,
&s_op->key, &s_op->val,
keyval_flags,
NULL, smcb, 0, js_p, &i, server_job_context);
@@ -335,7 +329,7 @@ static PINT_sm_action crdirent_update_di
PVFS_object_attr_to_ds_attr(tmp_attr_ptr, ds_attr);
ret = job_trove_dspace_setattr(
- s_op->u.crdirent.fs_id, s_op->u.crdirent.parent_handle,
+ s_op->req->u.crdirent.fs_id, s_op->req->u.crdirent.handle,
ds_attr,
TROVE_SYNC,
smcb, 0, js_p, &j_id, server_job_context);
@@ -347,29 +341,6 @@ static PINT_sm_action crdirent_cleanup(
struct PINT_smcb *smcb, job_status_s *js_p)
{
return(server_state_machine_complete(smcb));
-}
-
-/* crdirent_setup_op()
- *
- * prepare some state machine fields for later processing; mainly just
- * storing request structure fields in state machine so that nested
- * machines are not dependent on request type
- */
-static PINT_sm_action crdirent_setup_op(
- struct PINT_smcb *smcb, job_status_s *js_p)
-{
- struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
- PINT_ACCESS_DEBUG(s_op, GOSSIP_ACCESS_DEBUG, "crdirent entry: %s points to %llu\n",
- s_op->req->u.crdirent.name, llu(s_op->req->u.crdirent.new_handle));
-
- s_op->u.crdirent.name = s_op->req->u.crdirent.name;
- s_op->u.crdirent.new_handle = s_op->req->u.crdirent.new_handle;
- s_op->u.crdirent.parent_handle = s_op->req->u.crdirent.handle;
- s_op->u.crdirent.fs_id = s_op->req->u.crdirent.fs_id;
- s_op->u.crdirent.dir_attr_update_required = 0;
-
- js_p->error_code = 0;
- return SM_ACTION_COMPLETE;
}
PINT_GET_OBJECT_REF_DEFINE(crdirent);
Index: create-file.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/Attic/create-file.sm,v
diff -p -u -r1.1.2.21 -r1.1.2.22
--- create-file.sm 9 Sep 2008 16:24:28 -0000 1.1.2.21
+++ create-file.sm 23 Sep 2008 17:25:53 -0000 1.1.2.22
@@ -95,12 +95,6 @@ machine pvfs2_create_file_work_sm
state init
{
run create_file_init;
- default => init2;
- }
-
- state init2
- {
- run create_file_init2;
default => parent_getattr;
}
@@ -121,7 +115,7 @@ machine pvfs2_create_file_work_sm
state do_dspace_create
{
- jump pvfs2_create_sm;
+ jump pvfs2_create_work_sm;
success => dspace_create_local_cleanup;
default => cleanup_work;
}
@@ -186,7 +180,7 @@ machine pvfs2_create_file_work_sm
/* TODO: Do we need to handle multiple local creates? */
state do_datafiles_local
{
- jump pvfs2_create_sm;
+ jump pvfs2_create_work_sm;
success => datafiles_local_cleanup;
default => cleanup_work;
}
@@ -385,7 +379,9 @@ static PINT_sm_action create_file_init(
struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
job_id_t tmp_id;
struct PINT_server_op *s_op;
- int ret = 0;
+// int ret = 0;
+ PINT_sm_msgpair_state *msg_p = NULL;
+ struct PVFS_server_req *req;
gossip_debug(GOSSIP_SERVER_DEBUG, "create_file_init entered\n");
@@ -401,6 +397,17 @@ static PINT_sm_action create_file_init(
server_job_context);
}
+ PINT_CREATE_SUBORDINATE_SERVER_FRAME(smcb, s_op, sm_p->parent_ref.handle,
+ sm_p->parent_ref.fs_id, js_p->error_code, msg_p, req);
+ PINT_SERVREQ_GETATTR_FILL(*req,
+ *sm_p->cred_p,
+ sm_p->parent_ref.fs_id,
+ sm_p->parent_ref.handle,
+ PVFS_ATTR_COMMON_ALL|PVFS_ATTR_DIR_HINT);
+ js_p->error_code = 0;
+ return (SM_ACTION_COMPLETE);
+
+#if 0
/* Prepare to retrieve the parent's attributes. */
s_op = malloc(sizeof(struct PINT_server_op));
if(!s_op)
@@ -428,16 +435,20 @@ static PINT_sm_action create_file_init(
0, js_p, &tmp_id, server_job_context);
return ret;
+#endif
}
+#if 0
static PINT_sm_action create_file_init2(
struct PINT_smcb *smcb, job_status_s *js_p)
{
+ struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_PREVIOUS);
struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
PVFS_object_attr *obj_attr = NULL;
PVFS_ds_attributes *ds_attr = NULL;
gossip_debug(GOSSIP_SERVER_DEBUG, "create_file_init2 entered\n");
+ gossip_debug(GOSSIP_SERVER_DEBUG, "num_data_files = %d\n", sm_p->u.create_file.num_data_files);
ds_attr = &s_op->ds_attr;
obj_attr = &s_op->attr;
PVFS_ds_attr_to_object_attr(ds_attr, obj_attr);
@@ -445,6 +456,7 @@ static PINT_sm_action create_file_init2(
return SM_ACTION_COMPLETE;
}
+#endif
static int create_create_comp_fn(void *v_p,
struct PVFS_server_resp *resp_p,
@@ -619,7 +631,6 @@ error_code = 0;
}
}
-#if 0
PINT_CREATE_SUBORDINATE_SERVER_FRAME(smcb, s_op,
sm_p->u.create_file.meta_handle_extent_array.extent_array[0].first,
sm_p->object_ref.fs_id, js_p->error_code, msg_p, req);
@@ -630,8 +641,8 @@ error_code = 0;
sm_p->object_ref.fs_id,
PVFS_TYPE_METAFILE,
sm_p->u.create_file.meta_handle_extent_array);
-#endif
+#if 0
do {
char server_name[1024];
struct server_configuration_s *server_config = get_server_config_struct();
@@ -649,7 +660,8 @@ error_code = 0;
if (js_p->error_code == LOCAL_OPERATION || ! strcmp(server_config->host_id, server_name)) {
js_p->error_code = LOCAL_OPERATION;
req = s_op->req;
- s_op->prelude_mask = PRELUDE_SCHEDULER_DONE | PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
+ s_op->prelude_mask = PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
+// s_op->prelude_mask = PRELUDE_SCHEDULER_DONE | PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
} else {
do {
msg_p = &s_op->msgpair;
@@ -666,8 +678,6 @@ error_code = 0;
}
} while (0);
-
-
do {
memset(&(*req), 0, sizeof(*req));
(*req).op = PVFS_SERV_CREATE;
@@ -681,6 +691,7 @@ error_code = 0;
} while (0);
+#endif
if (js_p->error_code == REMOTE_OPERATION)
{
@@ -1039,9 +1050,10 @@ static PINT_sm_action create_file_datafi
}
/* zero out all members */
memset(s_op, 0, sizeof(struct PINT_server_op));
- s_op->req = s_op->decoded.buffer;
+ s_op->req = &s_op->decoded.stub_dec.req;
PINT_sm_push_frame(smcb, 0, s_op);
+// s_op->prelude_mask = PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
s_op->prelude_mask = PRELUDE_SCHEDULER_DONE | PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
s_op->op = PVFS_SERV_CREATE;
@@ -1133,15 +1145,53 @@ static PINT_sm_action create_file_setatt
{
struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
struct PINT_server_op *s_op;
- job_id_t tmp_id;
int ret = -PVFS_EINVAL;
- struct server_configuration_s *server_config = get_server_config_struct();
- char server_name[1024];
+ PINT_sm_msgpair_state *msg_p = NULL;
+ struct PVFS_server_req *req;
gossip_debug(GOSSIP_SERVER_DEBUG, "create_file_setattr_setup entered\n");
assert(sm_p);
+ PINT_CREATE_SUBORDINATE_SERVER_FRAME(smcb, s_op,
+ sm_p->u.create_file.meta_handle_extent_array.extent_array[0].first,
+ sm_p->object_ref.fs_id, js_p->error_code, msg_p, req);
+
+ PINT_SERVREQ_SETATTR_FILL(
+ *req,
+ *sm_p->cred_p,
+ sm_p->object_ref.fs_id,
+ sm_p->u.create_file.metafile_handle,
+ PVFS_TYPE_METAFILE,
+ sm_p->u.create_file.sys_attr,
+ PVFS_ATTR_COMMON_ALL | PVFS_ATTR_META_ALL);
+
+ req->u.setattr.attr.u.meta.dfile_array =
+ sm_p->u.create_file.datafile_handles;
+ req->u.setattr.attr.u.meta.dfile_count =
+ sm_p->u.create_file.num_data_files;
+ req->u.setattr.attr.u.meta.dist =
+ sm_p->u.create_file.dist;
+ req->u.setattr.attr.u.meta.dist_size =
+ PINT_DIST_PACK_SIZE(sm_p->u.create_file.dist);
+
+ if (js_p->error_code == REMOTE_OPERATION)
+ {
+ msg_p->fs_id = sm_p->object_ref.fs_id;
+ msg_p->handle = sm_p->u.create_file.metafile_handle;
+ msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY;
+ msg_p->comp_fn = create_setattr_comp_fn;
+
+ ret = PINT_cached_config_map_to_server(&msg_p->svr_addr,
+ sm_p->u.create_file.meta_handle_extent_array.extent_array[0].first, sm_p->object_ref.fs_id);
+
+ if (ret)
+ {
+ gossip_err("Failed to map meta server address\n");
+ js_p->error_code = ret;
+ }
+ }
+#if 0
s_op = malloc(sizeof(struct PINT_server_op));
if(!s_op)
@@ -1169,6 +1219,7 @@ static PINT_sm_action create_file_setatt
memcpy(&s_op->u.setattr.attr, &sm_p->u.create_file.attr, sizeof(PVFS_object_attr));
s_op->u.setattr.attr.objtype = PVFS_TYPE_METAFILE;
s_op->u.setattr.attr.mask = PVFS_ATTR_COMMON_ALL | PVFS_ATTR_META_ALL;
+// PINT_copy_object_attr(&s_op->u.setattr.attr, &sm_p->u.create_file.attr);
s_op->u.setattr.attr.u.meta.dfile_array =
sm_p->u.create_file.datafile_handles;
s_op->u.setattr.attr.u.meta.dfile_count =
@@ -1231,6 +1282,7 @@ static PINT_sm_action create_file_setatt
js_p->error_code = REMOTE_OPERATION;
return SM_ACTION_COMPLETE;
}
+#endif
return SM_ACTION_COMPLETE;
}
@@ -1258,32 +1310,52 @@ static PINT_sm_action create_file_crdire
struct PINT_smcb *smcb, job_status_s *js_p)
{
struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
- struct PINT_server_op *s_op = malloc(sizeof(struct PINT_server_op));
+ struct PINT_server_op *s_op;
+//= malloc(sizeof(struct PINT_server_op));
+ PINT_sm_msgpair_state *msg_p;
+ struct PVFS_server_req *req;
gossip_debug(GOSSIP_SERVER_DEBUG, "create_file_crdirent_setup entered\n");
+ PINT_CREATE_SUBORDINATE_SERVER_FRAME(smcb, s_op,
+ sm_p->parent_ref.handle,
+ sm_p->parent_ref.fs_id, js_p->error_code, msg_p, req);
+
+ PINT_SERVREQ_CRDIRENT_FILL(
+ *req,
+ *sm_p->cred_p,
+ sm_p->u.create_file.object_name,
+ sm_p->u.create_file.metafile_handle,
+ sm_p->parent_ref.handle,
+ sm_p->object_ref.fs_id);
+
+ js_p->error_code = 0;
+ return SM_ACTION_COMPLETE;
+#if 0
if(!s_op)
{
return -PVFS_ENOMEM;
}
/* zero out all members */
memset(s_op, 0, sizeof(struct PINT_server_op));
+// s_op->prelude_mask = PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
+ s_op->prelude_mask = PRELUDE_SCHEDULER_DONE | PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
PINT_sm_push_frame(smcb, 0, s_op);
s_op->op = PVFS_SERV_CRDIRENT;
+ s_op->credentials.uid = sm_p->cred_p->uid;
+ s_op->credentials.gid = sm_p->cred_p->gid;
memcpy(&s_op->attr, &sm_p->u.create_file.attr, sizeof(PVFS_object_attr));
s_op->u.crdirent.name = sm_p->u.create_file.object_name;
s_op->u.crdirent.new_handle = sm_p->u.create_file.metafile_handle;
s_op->u.crdirent.parent_handle = sm_p->parent_ref.handle;
s_op->u.crdirent.fs_id = sm_p->object_ref.fs_id;
- s_op->u.crdirent.dir_attr_update_required = 0;
-
- s_op->credentials.uid = sm_p->cred_p->uid;
- s_op->credentials.gid = sm_p->cred_p->gid;
memcpy(&s_op->attr, &sm_p->u.create_file.saved_parent_attr, sizeof(PVFS_object_attr));
+ s_op->u.crdirent.dir_attr_update_required = 0;
return SM_ACTION_COMPLETE;
+#endif
}
static PINT_sm_action create_file_crdirent_cleanup(
Index: create.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/create.sm,v
diff -p -u -r1.46.4.7 -r1.46.4.8
--- create.sm 9 Sep 2008 17:27:31 -0000 1.46.4.7
+++ create.sm 23 Sep 2008 17:25:53 -0000 1.46.4.8
@@ -17,11 +17,32 @@
machine pvfs2_create_sm
{
+ state do_work
+ {
+ jump pvfs2_create_work_sm;
+ default => final_response;
+ }
+
+ state final_response
+ {
+ jump pvfs2_final_response_sm;
+ default => cleanup;
+ }
+
+ state cleanup
+ {
+ run create_cleanup;
+ default => terminate;
+ }
+}
+
+nested machine pvfs2_create_work_sm
+{
state prelude
{
jump pvfs2_prelude_sm;
success => create;
- default => final_response;
+ default => setup_resp;
}
state create
@@ -33,19 +54,7 @@ machine pvfs2_create_sm
state setup_resp
{
run create_setup_resp;
- default => final_response;
- }
-
- state final_response
- {
- jump pvfs2_final_response_sm;
- default => cleanup;
- }
-
- state cleanup
- {
- run create_cleanup;
- default => terminate;
+ default => return;
}
}
Index: get-attr.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/get-attr.sm,v
diff -p -u -r1.87.4.2 -r1.87.4.3
--- get-attr.sm 28 Apr 2008 20:44:04 -0000 1.87.4.2
+++ get-attr.sm 23 Sep 2008 17:25:53 -0000 1.87.4.3
@@ -50,6 +50,13 @@ enum
nested machine pvfs2_get_attr_work_sm
{
+ state prelude
+ {
+ jump pvfs2_prelude_sm;
+ success => verify_attribs;
+ default => setup_resp;
+ }
+
state verify_attribs
{
run getattr_verify_attribs;
@@ -133,19 +140,6 @@ nested machine pvfs2_get_attr_work_sm
machine pvfs2_get_attr_sm
{
- state prelude
- {
- jump pvfs2_prelude_sm;
- success => setup_op;
- default => final_response;
- }
-
- state setup_op
- {
- run getattr_setup_op;
- default => do_work;
- }
-
state do_work
{
jump pvfs2_get_attr_work_sm;
@@ -243,16 +237,16 @@ static PINT_sm_action getattr_verify_att
we can safely do this now that we have the type of the object
(read in from the dspace, not stored in the resp_attr), and we
have the original client request attr mask
- (s_op->u.getattr.attrmask).
+ (s_op->req->u.getattr.attrmask).
*/
if (resp_attr->objtype == PVFS_TYPE_METAFILE)
{
PINT_ACCESS_DEBUG(s_op, GOSSIP_ACCESS_DEBUG, "type: metafile\n");
gossip_debug(GOSSIP_GETATTR_DEBUG,
" Req handle %llu refers to a metafile\n",
- llu(s_op->u.getattr.handle));
+ llu(s_op->req->u.getattr.handle));
- if (s_op->u.getattr.attrmask & PVFS_ATTR_META_DFILES)
+ if (s_op->req->u.getattr.attrmask & PVFS_ATTR_META_DFILES)
{
gossip_debug(GOSSIP_GETATTR_DEBUG,
" dspace has dfile_count of %d\n",
@@ -266,7 +260,7 @@ static PINT_sm_action getattr_verify_att
resp_attr->mask &= ~PVFS_ATTR_META_DFILES;
}
- if (s_op->u.getattr.attrmask & PVFS_ATTR_META_DIST)
+ if (s_op->req->u.getattr.attrmask & PVFS_ATTR_META_DIST)
{
gossip_debug(GOSSIP_GETATTR_DEBUG,
" dspace has dist size of %d\n",
@@ -298,13 +292,13 @@ static PINT_sm_action getattr_verify_att
gossip_debug(GOSSIP_GETATTR_DEBUG, " handle %llu refers to "
"a datafile (size = %lld).\n",
- llu(s_op->u.getattr.handle),
+ llu(s_op->req->u.getattr.handle),
lld(resp_attr->u.data.size));
}
else if (resp_attr->objtype == PVFS_TYPE_DIRECTORY)
{
PINT_ACCESS_DEBUG(s_op, GOSSIP_ACCESS_DEBUG, "type: directory\n");
- if (s_op->u.getattr.attrmask & PVFS_ATTR_DIR_DIRENT_COUNT)
+ if (s_op->req->u.getattr.attrmask & PVFS_ATTR_DIR_DIRENT_COUNT)
{
gossip_debug(GOSSIP_GETATTR_DEBUG,
" getattr: dirent_count needed.\n");
@@ -319,7 +313,7 @@ static PINT_sm_action getattr_verify_att
js_p->error_code = 0;
assert(resp_attr->mask & PVFS_ATTR_COMMON_ALL);
}
- if (s_op->u.getattr.attrmask & PVFS_ATTR_DIR_HINT)
+ if (s_op->req->u.getattr.attrmask & PVFS_ATTR_DIR_HINT)
{
gossip_debug(GOSSIP_GETATTR_DEBUG,
" getattr: dfile_count needed.\n");
@@ -340,7 +334,7 @@ static PINT_sm_action getattr_verify_att
gossip_debug(
GOSSIP_GETATTR_DEBUG, " handle %llu refers to "
"a dirdata object. doing nothing special\n",
- llu(s_op->u.getattr.handle));
+ llu(s_op->req->u.getattr.handle));
assert(resp_attr->mask & PVFS_ATTR_COMMON_ALL);
}
else if (resp_attr->objtype == PVFS_TYPE_SYMLINK)
@@ -348,7 +342,7 @@ static PINT_sm_action getattr_verify_att
PINT_ACCESS_DEBUG(s_op, GOSSIP_ACCESS_DEBUG, "type: symlink\n");
gossip_debug(
GOSSIP_GETATTR_DEBUG, " handle %llu refers to a symlink.\n",
- llu(s_op->u.getattr.handle));
+ llu(s_op->req->u.getattr.handle));
/*
we'll definitely have to fetch the symlink target in this
@@ -364,7 +358,7 @@ static PINT_sm_action getattr_verify_att
*/
gossip_err(
"Error: got unknown type when verifying attributes for handle %llu.\n",
- llu(s_op->u.getattr.handle));
+ llu(s_op->req->u.getattr.handle));
js_p->error_code = -PVFS_ENXIO;
}
return SM_ACTION_COMPLETE;
@@ -378,7 +372,7 @@ static PINT_sm_action getattr_read_symli
job_id_t i;
/* if we don't need to fill in the symlink target, skip it */
- if (!(s_op->u.getattr.attrmask & PVFS_ATTR_SYMLNK_TARGET))
+ if (!(s_op->req->u.getattr.attrmask & PVFS_ATTR_SYMLNK_TARGET))
{
gossip_debug(GOSSIP_GETATTR_DEBUG, "skipping symlink target read\n");
js_p->error_code = 0;
@@ -407,7 +401,7 @@ static PINT_sm_action getattr_read_symli
s_op->val.buffer_sz = s_op->resp.u.getattr.attr.u.sym.target_path_len;
ret = job_trove_keyval_read(
- s_op->u.getattr.fs_id, s_op->u.getattr.handle,
+ s_op->req->u.getattr.fs_id, s_op->req->u.getattr.handle,
&(s_op->key), &(s_op->val),
0,
NULL, smcb, 0, js_p,
@@ -488,13 +482,13 @@ static PINT_sm_action getattr_read_metaf
gossip_debug(GOSSIP_GETATTR_DEBUG,
" reading metafile hint (coll_id = %d, "
"handle = %llu, key = %s (%d), val_buf = %p (%d))\n",
- s_op->u.getattr.fs_id,
- llu(s_op->u.getattr.handle), (char *)s_op->key.buffer,
+ s_op->req->u.getattr.fs_id,
+ llu(s_op->req->u.getattr.handle), (char *)s_op->key.buffer,
s_op->key.buffer_sz, s_op->val.buffer,
s_op->val.buffer_sz);
ret = job_trove_keyval_read(
- s_op->u.getattr.fs_id, s_op->u.getattr.handle,
+ s_op->req->u.getattr.fs_id, s_op->req->u.getattr.handle,
&s_op->key, &s_op->val,
0,
NULL, smcb, 0, js_p,
@@ -516,7 +510,7 @@ static PINT_sm_action getattr_read_metaf
js_p->error_code = 0;
/* if we don't need to fill in the dfiles, skip them */
- if (!(s_op->u.getattr.attrmask & PVFS_ATTR_META_DFILES))
+ if (!(s_op->req->u.getattr.attrmask & PVFS_ATTR_META_DFILES))
{
gossip_debug(GOSSIP_GETATTR_DEBUG, "skipping data handle read\n");
return SM_ACTION_COMPLETE;
@@ -549,8 +543,8 @@ static PINT_sm_action getattr_read_metaf
(int)s_op->resp.u.getattr.attr.u.meta.dist_size);
gossip_err("handle: %llu (%llx), fsid: %d.\n",
- llu(s_op->u.getattr.handle), llu(s_op->u.getattr.handle),
- (int)s_op->u.getattr.fs_id);
+ llu(s_op->req->u.getattr.handle), llu(s_op->req->u.getattr.handle),
+ (int)s_op->req->u.getattr.fs_id);
/*If we hit an error the DIST & DFILES are no longer valid*/
s_op->resp.u.getattr.attr.mask &= ~PVFS_ATTR_META_DIST;
@@ -582,13 +576,13 @@ static PINT_sm_action getattr_read_metaf
gossip_debug(GOSSIP_GETATTR_DEBUG,
" reading %d datafile handles (coll_id = %d, "
"handle = %llu, key = %s (%d), val_buf = %p (%d))\n",
- dfile_count, s_op->u.getattr.fs_id,
- llu(s_op->u.getattr.handle), (char *)s_op->key.buffer,
+ dfile_count, s_op->req->u.getattr.fs_id,
+ llu(s_op->req->u.getattr.handle), (char *)s_op->key.buffer,
s_op->key.buffer_sz, s_op->val.buffer,
s_op->val.buffer_sz);
ret = job_trove_keyval_read(
- s_op->u.getattr.fs_id, s_op->u.getattr.handle,
+ s_op->req->u.getattr.fs_id, s_op->req->u.getattr.handle,
&s_op->key, &s_op->val,
0,
NULL, smcb, 0, js_p,
@@ -609,7 +603,7 @@ static PINT_sm_action getattr_read_metaf
js_p->error_code = 0;
/* if we don't need to fill in the distribution, skip it */
- if (!(s_op->u.getattr.attrmask & PVFS_ATTR_META_DIST))
+ if (!(s_op->req->u.getattr.attrmask & PVFS_ATTR_META_DIST))
{
gossip_debug(GOSSIP_GETATTR_DEBUG, "skipping data handle "
"distribution read\n");
@@ -627,8 +621,8 @@ static PINT_sm_action getattr_read_metaf
if (s_op->resp.u.getattr.attr.u.meta.dist_size < 1)
{
gossip_err("Cannot Read Dist! Got an invalid dist size for "
- "handle %llu,%d\n",llu(s_op->u.getattr.handle),
- s_op->u.getattr.fs_id);
+ "handle %llu,%d\n",llu(s_op->req->u.getattr.handle),
+ s_op->req->u.getattr.fs_id);
js_p->error_code = -PVFS_EINVAL;
return SM_ACTION_COMPLETE;
}
@@ -649,7 +643,7 @@ static PINT_sm_action getattr_read_metaf
s_op->free_val = 1;
ret = job_trove_keyval_read(
- s_op->u.getattr.fs_id, s_op->u.getattr.handle,
+ s_op->req->u.getattr.fs_id, s_op->req->u.getattr.handle,
&(s_op->key), &(s_op->val),
0,
NULL,
@@ -712,7 +706,7 @@ static PINT_sm_action getattr_setup_resp
if(resp_attr->u.meta.dist == 0) {
gossip_err("Found dist of 0 for handle %llu,%d\n",
- llu(s_op->u.getattr.handle), s_op->u.getattr.fs_id);
+ llu(s_op->req->u.getattr.handle), s_op->req->u.getattr.fs_id);
PVFS_perror("Metafile getattr_setup_resp",js_p->error_code);
js_p->error_code = -PVFS_EIO;
return SM_ACTION_COMPLETE;
@@ -752,8 +746,8 @@ static PINT_sm_action getattr_setup_resp
else
{
gossip_err("Failed to retrieve symlink target path for "
- "handle %llu,%d\n",llu(s_op->u.getattr.handle),
- s_op->u.getattr.fs_id);
+ "handle %llu,%d\n",llu(s_op->req->u.getattr.handle),
+ s_op->req->u.getattr.fs_id);
PVFS_perror("Symlink retrieval failure",js_p->error_code);
js_p->error_code = -PVFS_EINVAL;
@@ -816,18 +810,6 @@ static PINT_sm_action getattr_cleanup(
return(server_state_machine_complete(smcb));
}
-static PINT_sm_action getattr_setup_op(
- struct PINT_smcb *smcb, job_status_s *js_p)
-{
- struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
- s_op->u.getattr.handle = s_op->req->u.getattr.handle;
- s_op->u.getattr.fs_id = s_op->req->u.getattr.fs_id;
- s_op->u.getattr.attrmask = s_op->req->u.getattr.attrmask;
-
- js_p->error_code = 0;
- return SM_ACTION_COMPLETE;
-}
-
static PINT_sm_action getattr_get_dirdata_handle(
struct PINT_smcb *smcb, job_status_s *js_p)
{
@@ -841,7 +823,7 @@ static PINT_sm_action getattr_get_dirdat
s_op->val.buffer_sz = sizeof(PVFS_handle);
ret = job_trove_keyval_read(
- s_op->u.getattr.fs_id, s_op->u.getattr.handle,
+ s_op->req->u.getattr.fs_id, s_op->req->u.getattr.handle,
&s_op->key, &s_op->val,
0,
NULL,
@@ -861,7 +843,7 @@ static PINT_sm_action getattr_get_dirent
int ret;
job_id_t tmp_id;
- if (!(s_op->u.getattr.attrmask & PVFS_ATTR_DIR_DIRENT_COUNT))
+ if (!(s_op->req->u.getattr.attrmask & PVFS_ATTR_DIR_DIRENT_COUNT))
{
/* the caller didn't really want the dirent count; skip to get
* directory hints
@@ -870,7 +852,7 @@ static PINT_sm_action getattr_get_dirent
return SM_ACTION_COMPLETE;
}
ret = job_trove_keyval_get_handle_info(
- s_op->u.getattr.fs_id,
+ s_op->req->u.getattr.fs_id,
s_op->u.getattr.dirent_handle,
TROVE_KEYVAL_HANDLE_COUNT |
0,
@@ -919,7 +901,7 @@ static PINT_sm_action getattr_get_dir_hi
* function
*/
- if (!(s_op->u.getattr.attrmask & PVFS_ATTR_DIR_HINT))
+ if (!(s_op->req->u.getattr.attrmask & PVFS_ATTR_DIR_HINT))
{
/* the caller didn't really want the dir hints; skip
*/
@@ -933,7 +915,7 @@ static PINT_sm_action getattr_get_dir_hi
Trove_Special_Keys[DIST_NAME_KEY].key,
Trove_Special_Keys[DIST_PARAMS_KEY].key,
Trove_Special_Keys[NUM_DFILES_KEY].key,
- s_op->u.getattr.fs_id, llu(s_op->u.getattr.handle));
+ s_op->req->u.getattr.fs_id, llu(s_op->req->u.getattr.handle));
s_op->resp.u.getattr.attr.u.dir.hint.dist_params =
(char *) calloc(1, PVFS_REQ_LIMIT_DIST_BYTES);
@@ -1002,8 +984,8 @@ static PINT_sm_action getattr_get_dir_hi
js_p->error_code = 0;
ret = job_trove_keyval_read_list(
- s_op->u.getattr.fs_id,
- s_op->u.getattr.handle,
+ s_op->req->u.getattr.fs_id,
+ s_op->req->u.getattr.handle,
s_op->key_a, s_op->val_a, s_op->u.getattr.err_array, NUM_SPECIAL_KEYS,
0, NULL, smcb, 0, js_p, &tmp_id,
server_job_context);
Index: prelude.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/prelude.sm,v
diff -p -u -r1.71.2.1.2.2 -r1.71.2.1.2.3
--- prelude.sm 9 Sep 2008 16:24:28 -0000 1.71.2.1.2.2
+++ prelude.sm 23 Sep 2008 17:25:53 -0000 1.71.2.1.2.3
@@ -105,7 +105,13 @@ static PINT_sm_action prelude_req_sched(
struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
int ret = -PVFS_EINVAL;
+//ret = js_p.error_code = 0;
+//return SM_ACTION_COMPLETE;
if (s_op->prelude_mask & PRELUDE_SCHEDULER_DONE) {
+ gossip_debug(GOSSIP_SERVER_DEBUG,
+ "(%p) %s (prelude sm) state: req_sched already done... skipping.\n", s_op,
+ PINT_map_server_op_to_string(s_op->req->op));
+ js_p->error_code = 0;
return SM_ACTION_COMPLETE;
}
@@ -137,6 +143,10 @@ static PINT_sm_action prelude_getattr_if
job_id_t tmp_id;
if (s_op->prelude_mask & PRELUDE_GETATTR_DONE) {
+ gossip_debug(GOSSIP_SERVER_DEBUG,
+ "(%p) %s (prelude sm) state: getattr already done... skipping.\n", s_op,
+ PINT_map_server_op_to_string(s_op->req->op));
+ js_p->error_code = 0;
return SM_ACTION_COMPLETE;
}
@@ -152,6 +162,9 @@ static PINT_sm_action prelude_getattr_if
*/
if (s_op->target_handle == PVFS_HANDLE_NULL)
{
+ gossip_debug(GOSSIP_SERVER_DEBUG,
+ "(%p) %s (prelude sm) state: target_handle is NULL... skipping getattr.\n", s_op,
+ PINT_map_server_op_to_string(s_op->req->op));
js_p->error_code = 0;
return SM_ACTION_COMPLETE;
}
@@ -355,10 +368,6 @@ static PINT_sm_action prelude_perm_check
* resulting status value.
*/
- if (s_op->prelude_mask & PRELUDE_PERM_CHECK_DONE) {
- return SM_ACTION_COMPLETE;
- }
-
/*
first we translate the dspace attributes into a more convenient
server use-able format. i.e. a PVFS_object_attr
@@ -369,6 +378,13 @@ static PINT_sm_action prelude_perm_check
s_op->attr.mask = PVFS_ATTR_COMMON_ALL;
/* Set the target object attribute pointer.. used later by the acl check */
s_op->target_object_attr = obj_attr;
+
+ if (s_op->prelude_mask & PRELUDE_PERM_CHECK_DONE) {
+ gossip_debug(GOSSIP_SERVER_DEBUG,
+ "(%p) %s (prelude sm) state: perm check already done... skipping.\n", s_op,
+ PINT_map_server_op_to_string(s_op->req->op));
+ return SM_ACTION_COMPLETE;
+ }
if (s_op->target_fs_id != PVFS_FS_ID_NULL)
{
Index: pvfs2-server.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/pvfs2-server.h,v
diff -p -u -r1.147.6.6 -r1.147.6.7
--- pvfs2-server.h 9 Sep 2008 16:24:28 -0000 1.147.6.6
+++ pvfs2-server.h 23 Sep 2008 17:25:53 -0000 1.147.6.7
@@ -212,10 +212,10 @@ typedef enum
typedef enum
{
- PRELUDE_SCHEDULER_DONE = 0,
- PRELUDE_GETATTR_DONE = (1 << 0),
- PRELUDE_PERM_CHECK_DONE = (1 << 1),
- PRELUDE_LOCAL_CALL = (1 << 2),
+ PRELUDE_SCHEDULER_DONE = (1 << 0),
+ PRELUDE_GETATTR_DONE = (1 << 1),
+ PRELUDE_PERM_CHECK_DONE = (1 << 2),
+ PRELUDE_LOCAL_CALL = (1 << 3),
} PINT_prelude_flag;
/* struct PINT_server_lookup_op
@@ -480,7 +480,7 @@ typedef struct PINT_server_op
__s_op = malloc(sizeof(struct PINT_server_op)); \
if(!__s_op) { return -PVFS_ENOMEM; } \
memset(__s_op, 0, sizeof(struct PINT_server_op)); \
- __s_op->req = __s_op->decoded.buffer; \
+ __s_op->req = &__s_op->decoded.stub_dec.req; \
PINT_sm_push_frame(__smcb, 0, __s_op); \
if (__location != LOCAL_OPERATION) { \
PINT_cached_config_get_server_name(server_name, 1024, __handle, __fs_id); \
@@ -497,6 +497,10 @@ typedef struct PINT_server_op
} \
} while (0)
+#if 0
+ __s_op->prelude_mask = PRELUDE_PERM_CHECK_DONE | PRELUDE_LOCAL_CALL;
+#endif
+
#define PINT_CLEANUP_SUBORDINATE_SERVER_FRAME(__smcb, __s_op, __error_code) \
do { \
int task_id; \
@@ -539,6 +543,7 @@ extern struct PINT_state_machine_s pvfs2
extern struct PINT_state_machine_s pvfs2_set_attr_work_sm;
extern struct PINT_state_machine_s pvfs2_crdirent_work_sm;
extern struct PINT_state_machine_s pvfs2_create_sm;
+extern struct PINT_state_machine_s pvfs2_create_work_sm;
/* Exported Prototypes */
struct server_configuration_s *get_server_config_struct(void);
Index: set-attr.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/set-attr.sm,v
diff -p -u -r1.72.4.4 -r1.72.4.5
--- set-attr.sm 13 May 2008 16:22:46 -0000 1.72.4.4
+++ set-attr.sm 23 Sep 2008 17:25:53 -0000 1.72.4.5
@@ -22,8 +22,36 @@ enum
%%
+machine pvfs2_set_attr_sm
+{
+ state do_work
+ {
+ jump pvfs2_set_attr_work_sm;
+ default => final_response;
+ }
+
+ state final_response
+ {
+ jump pvfs2_final_response_sm;
+ default => cleanup;
+ }
+
+ state cleanup
+ {
+ run setattr_cleanup;
+ default => terminate;
+ }
+}
+
nested machine pvfs2_set_attr_work_sm
{
+ state prelude
+ {
+ jump pvfs2_prelude_sm;
+ success => verify_attribs;
+ default => return;
+ }
+
state verify_attribs
{
run setattr_verify_attribs;
@@ -61,40 +89,6 @@ nested machine pvfs2_set_attr_work_sm
}
}
-machine pvfs2_set_attr_sm
-{
- state prelude
- {
- jump pvfs2_prelude_sm;
- success => setup_op;
- default => final_response;
- }
-
- state setup_op
- {
- run setattr_setup_op;
- default => do_work;
- }
-
- state do_work
- {
- jump pvfs2_set_attr_work_sm;
- default => final_response;
- }
-
- state final_response
- {
- jump pvfs2_final_response_sm;
- default => cleanup;
- }
-
- state cleanup
- {
- run setattr_cleanup;
- default => terminate;
- }
-}
-
%%
static PINT_sm_action setattr_verify_attribs(
@@ -104,7 +98,7 @@ static PINT_sm_action setattr_verify_att
PVFS_object_attr *a_p = NULL, *req_a_p = NULL;
a_p = &s_op->attr;
- req_a_p = &s_op->u.setattr.attr;
+ req_a_p = &s_op->req->u.setattr.attr;
gossip_debug(GOSSIP_SETATTR_DEBUG, " attrs read from dspace:\n\t"
"[owner = %d, group = %d, perms = %o, type = %d]\n",
@@ -127,8 +121,8 @@ static PINT_sm_action setattr_verify_att
{
gossip_debug(GOSSIP_SETATTR_DEBUG, " handle %llu is of type %d "
"and cannot be changed to type %d\n",
- llu(s_op->u.setattr.handle),
- a_p->objtype, s_op->u.setattr.attr.objtype);
+ llu(s_op->req->u.setattr.handle),
+ a_p->objtype, s_op->req->u.setattr.attr.objtype);
/* set an error to bail out of set-attr processing */
js_p->error_code = -PVFS_EACCES;
@@ -150,7 +144,7 @@ static PINT_sm_action setattr_verify_att
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
" handle %llu refers to a metafile\n",
- llu(s_op->u.setattr.handle));
+ llu(s_op->req->u.setattr.handle));
gossip_debug(
GOSSIP_SETATTR_DEBUG, " *** dspace has dfile count %d and "
@@ -198,21 +192,21 @@ static PINT_sm_action setattr_verify_att
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
" handle %llu refers to a datafile\n",
- llu(s_op->u.setattr.handle));
+ llu(s_op->req->u.setattr.handle));
}
else if ((req_a_p->objtype == PVFS_TYPE_DIRECTORY) ||
(a_p->objtype == PVFS_TYPE_DIRECTORY))
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
" handle %llu refers to a directory\n",
- llu(s_op->u.setattr.handle));
+ llu(s_op->req->u.setattr.handle));
}
else if ((req_a_p->objtype == PVFS_TYPE_SYMLINK) ||
(a_p->objtype == PVFS_TYPE_SYMLINK))
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
" handle %llu refers to a symlink\n",
- llu(s_op->u.setattr.handle));
+ llu(s_op->req->u.setattr.handle));
if (req_a_p->mask & PVFS_ATTR_SYMLNK_ALL)
{
@@ -221,7 +215,7 @@ static PINT_sm_action setattr_verify_att
gossip_debug(GOSSIP_SETATTR_DEBUG,
" symlink links handle %llu to %s\n",
- llu(s_op->u.setattr.handle),
+ llu(s_op->req->u.setattr.handle),
req_a_p->u.sym.target_path);
a_p->u.sym.target_path_len = req_a_p->u.sym.target_path_len;
@@ -234,31 +228,19 @@ static PINT_sm_action setattr_verify_att
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
" handle %llu refers to a dirdata object\n",
- llu(s_op->u.setattr.handle));
+ llu(s_op->req->u.setattr.handle));
}
else
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
" handle %llu refers to something unknown\n",
- llu(s_op->u.setattr.handle));
+ llu(s_op->req->u.setattr.handle));
js_p->error_code = -PVFS_EACCES;
}
return SM_ACTION_COMPLETE;
}
-static PINT_sm_action setattr_setup_op(
- struct PINT_smcb *smcb, job_status_s *js_p)
-{
- struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
- s_op->u.setattr.handle = s_op->req->u.setattr.handle;
- s_op->u.setattr.fs_id = s_op->req->u.setattr.fs_id;
- s_op->u.setattr.attr = s_op->req->u.setattr.attr;
-
- js_p->error_code = 0;
- return SM_ACTION_COMPLETE;
-}
-
static PINT_sm_action setattr_setobj_attribs(
struct PINT_smcb *smcb, job_status_s *js_p)
{
@@ -270,13 +252,13 @@ static PINT_sm_action setattr_setobj_att
PVFS_ds_attributes *ds_attr = NULL;
dspace_a_p = &s_op->attr;
- a_p = &s_op->u.setattr.attr;
+ a_p = &s_op->req->u.setattr.attr;
if (a_p->mask & PVFS_ATTR_META_DFILES)
{
gossip_debug(GOSSIP_SETATTR_DEBUG, " request has dfile_count of "
"%d | dspace has %d\n",
- s_op->u.setattr.attr.u.meta.dfile_count,
+ s_op->req->u.setattr.attr.u.meta.dfile_count,
s_op->attr.u.meta.dfile_count);
gossip_debug(GOSSIP_SETATTR_DEBUG, " writing count of %d to "
@@ -333,7 +315,7 @@ static PINT_sm_action setattr_setobj_att
PVFS_object_attr_to_ds_attr(dspace_a_p, ds_attr);
ret = job_trove_dspace_setattr(
- s_op->u.setattr.fs_id, s_op->u.setattr.handle,
+ s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle,
ds_attr,
TROVE_SYNC,
smcb, 0, js_p, &j_id, server_job_context);
@@ -353,11 +335,11 @@ static PINT_sm_action setattr_write_meta
gossip_debug(GOSSIP_SETATTR_DEBUG,
" request has dfile_count of %d | dspace has %d\n",
- s_op->u.setattr.attr.u.meta.dfile_count,
+ s_op->req->u.setattr.attr.u.meta.dfile_count,
s_op->attr.u.meta.dfile_count);
/* verify that the requested dfile count is sane */
- dfile_count = s_op->u.setattr.attr.u.meta.dfile_count;
+ dfile_count = s_op->req->u.setattr.attr.u.meta.dfile_count;
if ((dfile_count < 1) || (dfile_count > PVFS_REQ_LIMIT_DFILE_COUNT))
{
gossip_err("The requested dfile count of %d is invalid; "
@@ -372,22 +354,22 @@ static PINT_sm_action setattr_write_meta
gossip_debug(GOSSIP_SETATTR_DEBUG,
" metafile has %d datafiles associated with it\n",
- s_op->u.setattr.attr.u.meta.dfile_count);
+ s_op->req->u.setattr.attr.u.meta.dfile_count);
- s_op->val.buffer = s_op->u.setattr.attr.u.meta.dfile_array;
+ s_op->val.buffer = s_op->req->u.setattr.attr.u.meta.dfile_array;
s_op->val.buffer_sz = dfile_count * sizeof(PVFS_handle);
gossip_debug(
GOSSIP_SETATTR_DEBUG, " writing %s [%llu,%d,"
"len %d]\n", (char *)s_op->key.buffer,
- llu(s_op->u.setattr.handle), s_op->u.setattr.fs_id,
+ llu(s_op->req->u.setattr.handle), s_op->req->u.setattr.fs_id,
s_op->val.buffer_sz);
/* we don't sync here since we're going to do it anyway in
* write_metafile_distribution
*/
ret = job_trove_keyval_write(
- s_op->u.setattr.fs_id, s_op->u.setattr.handle,
+ s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle,
&(s_op->key), &(s_op->val),
0,
NULL, smcb, 0, js_p, &j_id, server_job_context);
@@ -403,7 +385,7 @@ static PINT_sm_action setattr_write_meta
job_id_t j_id;
/* if we don't need to fill in the distribution, skip it */
- if (!(s_op->u.setattr.attr.mask & PVFS_ATTR_META_DIST))
+ if (!(s_op->req->u.setattr.attr.mask & PVFS_ATTR_META_DIST))
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
"skipping distribution write\n");
@@ -417,9 +399,9 @@ static PINT_sm_action setattr_write_meta
gossip_debug(GOSSIP_SETATTR_DEBUG,
" metafile distribution size = %d\n",
- (int)s_op->u.setattr.attr.u.meta.dist_size);
+ (int)s_op->req->u.setattr.attr.u.meta.dist_size);
- s_op->val.buffer_sz = s_op->u.setattr.attr.u.meta.dist_size;
+ s_op->val.buffer_sz = s_op->req->u.setattr.attr.u.meta.dist_size;
s_op->val.buffer = malloc(s_op->val.buffer_sz);
if(!s_op->val.buffer)
@@ -430,15 +412,15 @@ static PINT_sm_action setattr_write_meta
s_op->free_val = 1;
PINT_dist_encode(s_op->val.buffer,
- s_op->u.setattr.attr.u.meta.dist);
+ s_op->req->u.setattr.attr.u.meta.dist);
gossip_debug(
GOSSIP_SERVER_DEBUG, " writing %s [%llu,%d,"
"len %d]\n", (char *)s_op->key.buffer,
- llu(s_op->u.setattr.handle), s_op->u.setattr.fs_id,
+ llu(s_op->req->u.setattr.handle), s_op->req->u.setattr.fs_id,
s_op->val.buffer_sz);
ret = job_trove_keyval_write(
- s_op->u.setattr.fs_id, s_op->u.setattr.handle,
+ s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle,
&(s_op->key), &(s_op->val),
TROVE_SYNC,
NULL, smcb, 0, js_p, &j_id, server_job_context);
@@ -454,7 +436,7 @@ static PINT_sm_action setattr_write_syml
job_id_t j_id;
/* if we don't need to fill in the symlink target, skip it */
- if (!(s_op->u.setattr.attr.mask & PVFS_ATTR_SYMLNK_TARGET))
+ if (!(s_op->req->u.setattr.attr.mask & PVFS_ATTR_SYMLNK_TARGET))
{
gossip_debug(GOSSIP_SETATTR_DEBUG,
"skipping symlink target write\n");
@@ -462,8 +444,8 @@ static PINT_sm_action setattr_write_syml
return SM_ACTION_COMPLETE;
}
- assert(s_op->u.setattr.attr.u.sym.target_path_len > 0);
- assert(s_op->u.setattr.attr.u.sym.target_path);
+ assert(s_op->req->u.setattr.attr.u.sym.target_path_len > 0);
+ assert(s_op->req->u.setattr.attr.u.sym.target_path);
/* set up key and value structure for keyval write */
s_op->key.buffer = Trove_Common_Keys[SYMLINK_TARGET_KEY].key;
@@ -471,19 +453,19 @@ static PINT_sm_action setattr_write_syml
gossip_debug(GOSSIP_SETATTR_DEBUG,
" symlink target_path_len = %d\n",
- s_op->u.setattr.attr.u.sym.target_path_len);
+ s_op->req->u.setattr.attr.u.sym.target_path_len);
- s_op->val.buffer = s_op->u.setattr.attr.u.sym.target_path;
- s_op->val.buffer_sz = s_op->u.setattr.attr.u.sym.target_path_len;
+ s_op->val.buffer = s_op->req->u.setattr.attr.u.sym.target_path;
+ s_op->val.buffer_sz = s_op->req->u.setattr.attr.u.sym.target_path_len;
gossip_debug(GOSSIP_SETATTR_DEBUG, " writing %s [%llu,%d,"
"len %d]\n", (char *)s_op->key.buffer,
- llu(s_op->u.setattr.handle),
- s_op->u.setattr.fs_id,
+ llu(s_op->req->u.setattr.handle),
+ s_op->req->u.setattr.fs_id,
s_op->val.buffer_sz);
ret = job_trove_keyval_write(
- s_op->u.setattr.fs_id, s_op->u.setattr.handle,
+ s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle,
&(s_op->key), &(s_op->val),
TROVE_SYNC,
NULL, smcb, 0, js_p, &j_id, server_job_context);
More information about the Pvfs2-cvs
mailing list