[PVFS2-CVS]
commit by neill in pvfs2/src/client/sysint: client-state-machine.h
mgmt-event-mon-list.sm mgmt-get-dfile-array.sm
mgmt-iterate-handles-list.sm mgmt-noop.sm mgmt-perf-mon-list.sm
mgmt-setparam-list.sm mgmt-statfs-list.sm server-get-config.sm
sys-create.sm sys-flush.sm sys-getattr.sm sys-io.sm sys-lookup.sm
sys-mkdir.sm sys-readdir.sm sys-remove.sm sys-rename.sm
sys-setattr.sm sys-symlink.sm sys-truncate.sm
CVS commit program
cvs at parl.clemson.edu
Tue Jul 13 14:37:20 EDT 2004
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb:/tmp/cvs-serv23732/src/client/sysint
Modified Files:
client-state-machine.h mgmt-event-mon-list.sm
mgmt-get-dfile-array.sm mgmt-iterate-handles-list.sm
mgmt-noop.sm mgmt-perf-mon-list.sm mgmt-setparam-list.sm
mgmt-statfs-list.sm server-get-config.sm sys-create.sm
sys-flush.sm sys-getattr.sm sys-io.sm sys-lookup.sm
sys-mkdir.sm sys-readdir.sm sys-remove.sm sys-rename.sm
sys-setattr.sm sys-symlink.sm sys-truncate.sm
Log Message:
- rename flow_timeout to write_transfer_timeout
- revert the timeout passed into the flow to be the default client job
timeout
- macro-ize the msgarray_param default initialization to make life
easy if and when these values change (now there's only one place to
change)
- minor update to the server flush error path
- increase sys-flush job timeout since a long sync can take longer
than the default job timeout
- misc cleanups and cruft removal
Index: client-state-machine.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/client-state-machine.h,v
diff -p -u -r1.121 -r1.122
--- client-state-machine.h 13 Jul 2004 15:29:05 -0000 1.121
+++ client-state-machine.h 13 Jul 2004 17:37:19 -0000 1.122
@@ -136,12 +136,12 @@ typedef struct
/* a reference to the msgpair we're using for communication */
PINT_sm_msgpair_state *msg;
- int flow_timeout;
job_id_t flow_job_id;
job_status_s flow_status;
flow_descriptor flow_desc;
PVFS_msg_tag_t session_tag;
+ int write_transfer_timeout;
PINT_client_sm_recv_state write_ack;
/*
@@ -531,6 +531,15 @@ do {
free(sm_p); \
return -PVFS_ENOMEM; \
} \
+} while(0)
+
+#define PINT_init_msgarray_params(msgarray_params_ptr)\
+do { \
+ PINT_sm_msgpair_params *mpp = msgarray_params_ptr;\
+ mpp->job_context = pint_client_sm_context; \
+ mpp->job_timeout = PVFS2_CLIENT_JOB_TIMEOUT; \
+ mpp->retry_delay = PVFS2_CLIENT_RETRY_DELAY; \
+ mpp->retry_limit = PVFS2_CLIENT_RETRY_LIMIT; \
} while(0)
/* misc helper methods */
Index: mgmt-event-mon-list.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-event-mon-list.sm,v
diff -p -u -r1.19 -r1.20
--- mgmt-event-mon-list.sm 13 Jul 2004 01:47:55 -0000 1.19
+++ mgmt-event-mon-list.sm 13 Jul 2004 17:37:19 -0000 1.20
@@ -85,12 +85,8 @@ int PVFS_imgmt_event_mon_list(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.event_mon_list.fs_id = fs_id;
sm_p->u.event_mon_list.event_matrix = event_matrix;
Index: mgmt-get-dfile-array.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-get-dfile-array.sm,v
diff -p -u -r1.15 -r1.16
--- mgmt-get-dfile-array.sm 13 Jul 2004 01:47:55 -0000 1.15
+++ mgmt-get-dfile-array.sm 13 Jul 2004 17:37:19 -0000 1.16
@@ -85,12 +85,8 @@ int PVFS_imgmt_get_dfile_array(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->object_ref = ref;
sm_p->u.get_dfile_array.dfile_array = dfile_array;
Index: mgmt-iterate-handles-list.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-iterate-handles-list.sm,v
diff -p -u -r1.17 -r1.18
--- mgmt-iterate-handles-list.sm 13 Jul 2004 01:47:55 -0000 1.17
+++ mgmt-iterate-handles-list.sm 13 Jul 2004 17:37:19 -0000 1.18
@@ -86,12 +86,8 @@ int PVFS_imgmt_iterate_handles_list(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.iterate_handles_list.fs_id = fs_id;
sm_p->u.iterate_handles_list.server_count = server_count;
Index: mgmt-noop.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-noop.sm,v
diff -p -u -r1.21 -r1.22
--- mgmt-noop.sm 13 Jul 2004 01:47:55 -0000 1.21
+++ mgmt-noop.sm 13 Jul 2004 17:37:19 -0000 1.22
@@ -70,12 +70,8 @@ int PVFS_imgmt_noop(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->msgpair.fs_id = fs_id;
sm_p->msgpair.retry_flag = PVFS_MSGPAIR_NO_RETRY;
Index: mgmt-perf-mon-list.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-perf-mon-list.sm,v
diff -p -u -r1.22 -r1.23
--- mgmt-perf-mon-list.sm 13 Jul 2004 01:47:55 -0000 1.22
+++ mgmt-perf-mon-list.sm 13 Jul 2004 17:37:19 -0000 1.23
@@ -88,12 +88,8 @@ int PVFS_imgmt_perf_mon_list(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.perf_mon_list.fs_id = fs_id;
sm_p->u.perf_mon_list.perf_matrix = perf_matrix;
Index: mgmt-setparam-list.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-setparam-list.sm,v
diff -p -u -r1.20 -r1.21
--- mgmt-setparam-list.sm 13 Jul 2004 01:47:55 -0000 1.20
+++ mgmt-setparam-list.sm 13 Jul 2004 17:37:19 -0000 1.21
@@ -88,12 +88,8 @@ int PVFS_imgmt_setparam_list(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.setparam_list.fs_id = fs_id;
sm_p->u.setparam_list.param = param;
Index: mgmt-statfs-list.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/mgmt-statfs-list.sm,v
diff -p -u -r1.28 -r1.29
--- mgmt-statfs-list.sm 13 Jul 2004 01:47:55 -0000 1.28
+++ mgmt-statfs-list.sm 13 Jul 2004 17:37:19 -0000 1.29
@@ -84,12 +84,8 @@ int PVFS_imgmt_statfs_list(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.statfs_list.fs_id = fs_id;
sm_p->u.statfs_list.stat_array = stat_array;
Index: server-get-config.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/server-get-config.sm,v
diff -p -u -r1.9 -r1.10
--- server-get-config.sm 13 Jul 2004 01:47:55 -0000 1.9
+++ server-get-config.sm 13 Jul 2004 17:37:19 -0000 1.10
@@ -104,12 +104,8 @@ int PINT_server_get_config(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, &creds);
sm_p->u.get_config.mntent = mntent_p;
Index: sys-create.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-create.sm,v
diff -p -u -r1.51 -r1.52
--- sys-create.sm 13 Jul 2004 01:47:55 -0000 1.51
+++ sys-create.sm 13 Jul 2004 17:37:19 -0000 1.52
@@ -260,12 +260,8 @@ int PVFS_isys_create(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.create.object_name = object_name;
sm_p->parent_ref = parent_ref;
@@ -437,53 +433,36 @@ static int create_setattr_comp_fn(void *
struct PVFS_server_resp *resp_p,
int index)
{
-/* PINT_client_sm *sm_p = (PINT_client_sm *) v_p; */
-
gossip_debug(GOSSIP_CLIENT_DEBUG, "create_setattr_comp_fn\n");
assert(resp_p->op == PVFS_SERV_SETATTR);
-
- if (resp_p->status != 0)
- {
- return resp_p->status;
- }
- return 0;
+ return resp_p->status;
}
static int create_crdirent_comp_fn(void *v_p,
struct PVFS_server_resp *resp_p,
int index)
{
-/* PINT_client_sm *sm_p = (PINT_client_sm *) v_p; */
-
gossip_debug(GOSSIP_CLIENT_DEBUG, "create_crdirent_comp_fn\n");
assert(resp_p->op == PVFS_SERV_CRDIRENT);
-
- if (resp_p->status != 0)
- {
- return resp_p->status;
- }
- return 0;
+ return resp_p->status;
}
static int create_delete_handles_comp_fn(void *v_p,
struct PVFS_server_resp *resp_p,
int index)
{
-/* PINT_client_sm *sm_p = (PINT_client_sm *) v_p; */
-
gossip_debug(GOSSIP_CLIENT_DEBUG, "create_delete_handles_comp_fn\n");
assert(resp_p->op == PVFS_SERV_REMOVE);
if (resp_p->status != 0)
{
- gossip_debug(GOSSIP_CLIENT_DEBUG, "Failed to remove handle %d\n",
- index);
- return resp_p->status;
+ gossip_debug(GOSSIP_CLIENT_DEBUG,
+ "Failed to remove handle number %d\n", index);
}
- return 0;
+ return resp_p->status;
}
static int create_dspace_create_setup_msgpair(PINT_client_sm *sm_p,
@@ -514,6 +493,9 @@ static int create_dspace_create_setup_ms
msg_p = &sm_p->msgpair;
memset(msg_p, 0, sizeof(PINT_sm_msgpair_state));
+ sm_p->msgarray = msg_p;
+ sm_p->msgarray_count = 1;
+
server_config = PINT_get_server_config_struct(
sm_p->parent_ref.fs_id);
@@ -536,18 +518,10 @@ static int create_dspace_create_setup_ms
PVFS_TYPE_METAFILE,
meta_handle_extent_array);
- /* fill in msgpair structure components */
msg_p->fs_id = sm_p->parent_ref.fs_id;
msg_p->handle = meta_handle_extent_array.extent_array[0].first;
msg_p->retry_flag = PVFS_MSGPAIR_RETRY;
msg_p->comp_fn = create_create_comp_fn;
-
- sm_p->msgarray = msg_p;
- sm_p->msgarray_count = 1;
-
- /* let 'msgpairarray' handle the 'msgpair' case */
- sm_p->msgarray = &(sm_p->msgpair);
- sm_p->msgarray_count = 1;
return 1;
}
Index: sys-flush.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-flush.sm,v
diff -p -u -r1.22 -r1.23
--- sys-flush.sm 13 Jul 2004 01:47:55 -0000 1.22
+++ sys-flush.sm 13 Jul 2004 17:37:19 -0000 1.23
@@ -110,15 +110,18 @@ int PVFS_isys_flush(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->object_ref = ref;
+ /*
+ override the default job timeout on the internal msgarray for a
+ flush since a large sync operation can easily take longer than
+ most other operations
+ */
+ sm_p->msgarray_params.job_timeout = (5 * PVFS2_CLIENT_JOB_TIMEOUT);
+
return PINT_client_state_machine_post(
sm_p, PVFS_SYS_FLUSH, op_id, user_ptr);
}
@@ -178,9 +181,8 @@ static int flush_datafile_setup_msgpaira
sm_p->msgarray_count = (attr->u.meta.dfile_count + 1);
/* allocate memory for datafile message pairs and the metafile */
- sm_p->msgarray = (PINT_sm_msgpair_state *)
- malloc(sm_p->msgarray_count *
- sizeof(PINT_sm_msgpair_state));
+ sm_p->msgarray = (PINT_sm_msgpair_state *)malloc(
+ (sm_p->msgarray_count * sizeof(PINT_sm_msgpair_state)));
if (!sm_p->msgarray)
{
js_p->error_code = -PVFS_ENOMEM;
@@ -227,7 +229,6 @@ static int flush_datafile_setup_msgpaira
}
}
- /* fill in address of each server to contact */
ret = PINT_serv_msgpairarray_resolve_addrs(
sm_p->msgarray_count, sm_p->msgarray);
if (ret)
@@ -258,6 +259,7 @@ static int flush_cleanup(PINT_client_sm
if (sm_p->msgarray)
{
free(sm_p->msgarray);
+ sm_p->msgarray = NULL;
}
sm_p->op_complete = 1;
Index: sys-getattr.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-getattr.sm,v
diff -p -u -r1.63 -r1.64
--- sys-getattr.sm 13 Jul 2004 01:47:55 -0000 1.63
+++ sys-getattr.sm 13 Jul 2004 17:37:19 -0000 1.64
@@ -151,12 +151,8 @@ int PVFS_isys_getattr(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->error_code = 0;
sm_p->u.getattr.object_ref = ref;
Index: sys-io.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-io.sm,v
diff -p -u -r1.85 -r1.86
--- sys-io.sm 13 Jul 2004 15:29:05 -0000 1.85
+++ sys-io.sm 13 Jul 2004 17:37:19 -0000 1.86
@@ -57,7 +57,7 @@ static inline int process_context_recv_a
static inline int check_context_status(
PINT_client_io_ctx *cur_ctx, int io_type,
PVFS_size *total_size);
-static inline int compute_scaling_flow_timeout(
+static inline int compute_scaling_write_transfer_timeout(
PVFS_size data_size, int datafile_count);
static int io_find_target_datafiles(
PVFS_Request mem_req, PVFS_Request file_req,
@@ -236,12 +236,8 @@ int PVFS_isys_io(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->object_ref = ref;
sm_p->u.io.io_type = io_type;
@@ -1214,22 +1210,17 @@ static inline int build_context_flow(
cur_ctx->flow_desc.mem_req = sm_p->u.io.mem_req;
- cur_ctx->flow_timeout = compute_scaling_flow_timeout(
- cur_ctx->flow_desc.file_data.fsize,
- cur_ctx->flow_desc.file_data.server_ct);
+ cur_ctx->flow_desc.tag = cur_ctx->session_tag;
+ cur_ctx->flow_desc.type = sm_p->u.io.flowproto_type;
+ cur_ctx->flow_desc.user_ptr = NULL;
gossip_debug(
GOSSIP_IO_DEBUG, " bstream_size = %Ld, datafile_nr = "
- "%d, datafile_ct = %d\n\tfile_req_off = %Ld (timeout=%d secs)\n",
+ "%d, datafile_ct = %d\n\tfile_req_off = %Ld\n",
Ld(cur_ctx->flow_desc.file_data.fsize),
cur_ctx->flow_desc.file_data.server_nr,
cur_ctx->flow_desc.file_data.server_ct,
- Ld(cur_ctx->flow_desc.file_req_offset),
- cur_ctx->flow_timeout);
-
- cur_ctx->flow_desc.tag = cur_ctx->session_tag;
- cur_ctx->flow_desc.type = sm_p->u.io.flowproto_type;
- cur_ctx->flow_desc.user_ptr = NULL;
+ Ld(cur_ctx->flow_desc.file_req_offset));
if (sm_p->u.io.io_type == PVFS_IO_READ)
{
@@ -1248,6 +1239,14 @@ static inline int build_context_flow(
cur_ctx->flow_desc.src.u.mem.buffer = sm_p->u.io.buffer;
cur_ctx->flow_desc.dest.endpoint_id = BMI_ENDPOINT;
cur_ctx->flow_desc.dest.u.bmi.address = cur_ctx->msg->svr_addr;
+
+ cur_ctx->write_transfer_timeout =
+ compute_scaling_write_transfer_timeout(
+ cur_ctx->flow_desc.file_data.fsize,
+ cur_ctx->flow_desc.file_data.server_ct);
+
+ gossip_debug(GOSSIP_IO_DEBUG, " using write_transfer_timeout "
+ "of %d seconds\n", cur_ctx->write_transfer_timeout);
}
return 0;
}
@@ -1336,8 +1335,8 @@ static inline int process_context_recv_a
we're pre-posting the final write ack here, even though it's
ahead of the flow phase; reads are at the flow phase.
- the timeout used here is slightly longer than the flow
- (since this should happen sometime after the flow completes)
+ the timeout used here is a scaling one that needs to be long
+ enough for the entire flow to occur
*/
status_user_tag = ((4 * cur_ctx->index) + IO_SM_PHASE_FINAL_ACK);
@@ -1346,8 +1345,7 @@ static inline int process_context_recv_a
cur_ctx->write_ack.max_resp_sz, cur_ctx->session_tag,
BMI_PRE_ALLOC, sm_p, status_user_tag,
&cur_ctx->write_ack.recv_status, &cur_ctx->write_ack.recv_id,
- pint_client_sm_context,
- (cur_ctx->flow_timeout + PVFS2_CLIENT_JOB_TIMEOUT));
+ pint_client_sm_context, cur_ctx->write_transfer_timeout);
if (ret < 0)
{
@@ -1366,7 +1364,7 @@ static inline int process_context_recv_a
ret = job_flow(
&cur_ctx->flow_desc, sm_p, status_user_tag,
&cur_ctx->flow_status, &cur_ctx->flow_job_id,
- pint_client_sm_context, cur_ctx->flow_timeout);
+ pint_client_sm_context, PVFS2_CLIENT_JOB_TIMEOUT);
if (ret < 0)
{
@@ -1491,7 +1489,7 @@ static inline int check_context_status(
return ret;
}
-static inline int compute_scaling_flow_timeout(
+static inline int compute_scaling_write_transfer_timeout(
PVFS_size data_size, int datafile_count)
{
static int one_hundred_megs = (1024 * 1024 * 100);
Index: sys-lookup.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-lookup.sm,v
diff -p -u -r1.41 -r1.42
--- sys-lookup.sm 13 Jul 2004 01:47:55 -0000 1.41
+++ sys-lookup.sm 13 Jul 2004 17:37:19 -0000 1.42
@@ -481,12 +481,8 @@ int PVFS_isys_ref_lookup(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(PINT_client_sm));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.lookup.orig_pathname = relative_pathname;
sm_p->u.lookup.starting_refn = parent;
Index: sys-mkdir.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-mkdir.sm,v
diff -p -u -r1.29 -r1.30
--- sys-mkdir.sm 13 Jul 2004 01:47:55 -0000 1.29
+++ sys-mkdir.sm 13 Jul 2004 17:37:19 -0000 1.30
@@ -190,12 +190,8 @@ int PVFS_isys_mkdir(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.mkdir.object_name = object_name;
sm_p->parent_ref = parent_ref;
Index: sys-readdir.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-readdir.sm,v
diff -p -u -r1.22 -r1.23
--- sys-readdir.sm 13 Jul 2004 01:47:55 -0000 1.22
+++ sys-readdir.sm 13 Jul 2004 17:37:19 -0000 1.23
@@ -126,12 +126,8 @@ int PVFS_isys_readdir(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.readdir.pos_token = token;
sm_p->u.readdir.dirent_limit = pvfs_dirent_incount;
Index: sys-remove.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-remove.sm,v
diff -p -u -r1.69 -r1.70
--- sys-remove.sm 13 Jul 2004 01:47:55 -0000 1.69
+++ sys-remove.sm 13 Jul 2004 17:37:19 -0000 1.70
@@ -178,12 +178,8 @@ int PVFS_isys_remove(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.remove.object_name = object_name;
sm_p->parent_ref = parent_ref;
Index: sys-rename.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-rename.sm,v
diff -p -u -r1.27 -r1.28
--- sys-rename.sm 13 Jul 2004 01:47:55 -0000 1.27
+++ sys-rename.sm 13 Jul 2004 17:37:19 -0000 1.28
@@ -271,12 +271,9 @@ int PVFS_isys_rename(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
+ PINT_init_sysint_credentials(sm_p->cred_p, credentials);
/*
this state machine has several hardcoded 2's around because
we're dealing with 1 'old' entry, 1 'old' handle, 1 'old' parent
@@ -289,7 +286,6 @@ int PVFS_isys_rename(
msgarrays rather than doing a longer sequence of serial
msgpairs.
*/
- PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.rename.entries[0] = old_entry;
sm_p->u.rename.entries[1] = new_entry;
sm_p->u.rename.parent_refns[0] = old_parent_ref;
Index: sys-setattr.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-setattr.sm,v
diff -p -u -r1.23 -r1.24
--- sys-setattr.sm 13 Jul 2004 01:47:55 -0000 1.23
+++ sys-setattr.sm 13 Jul 2004 17:37:19 -0000 1.24
@@ -127,12 +127,8 @@ int PVFS_isys_setattr(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->object_ref = ref;
sm_p->u.setattr.refn = ref;
Index: sys-symlink.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-symlink.sm,v
diff -p -u -r1.35 -r1.36
--- sys-symlink.sm 13 Jul 2004 01:47:55 -0000 1.35
+++ sys-symlink.sm 13 Jul 2004 17:37:20 -0000 1.36
@@ -221,12 +221,8 @@ int PVFS_isys_symlink(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->u.sym.link_name = entry_name;
sm_p->u.sym.link_target = target;
Index: sys-truncate.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-truncate.sm,v
diff -p -u -r1.26 -r1.27
--- sys-truncate.sm 13 Jul 2004 01:47:55 -0000 1.26
+++ sys-truncate.sm 13 Jul 2004 17:37:20 -0000 1.27
@@ -112,12 +112,8 @@ int PVFS_isys_truncate(
return -PVFS_ENOMEM;
}
memset(sm_p, 0, sizeof(*sm_p));
- /* set msgpair default parameters */
- sm_p->msgarray_params.job_context = pint_client_sm_context;
- sm_p->msgarray_params.job_timeout = PVFS2_CLIENT_JOB_TIMEOUT;
- sm_p->msgarray_params.retry_delay = PVFS2_CLIENT_RETRY_DELAY;
- sm_p->msgarray_params.retry_limit = PVFS2_CLIENT_RETRY_LIMIT;
+ PINT_init_msgarray_params(&sm_p->msgarray_params);
PINT_init_sysint_credentials(sm_p->cred_p, credentials);
sm_p->object_ref = ref;
sm_p->u.truncate.size = size;
More information about the PVFS2-CVS
mailing list