[Pvfs2-cvs] commit by bligon in pvfs2/src/common/misc:
msgpairarray.h msgpairarray.sm pvfs2-debug.c pvfs2-internal.h
state-machine.h
CVS commit program
cvs at parl.clemson.edu
Thu Apr 30 11:03:00 EDT 2009
Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv320/src/common/misc
Modified Files:
Tag: Orange-Branch
msgpairarray.h msgpairarray.sm pvfs2-debug.c pvfs2-internal.h
state-machine.h
Log Message:
Setting up Orange Branch
Index: msgpairarray.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/msgpairarray.h,v
diff -p -u -r1.14 -r1.14.10.1
--- msgpairarray.h 8 Sep 2008 15:42:41 -0000 1.14
+++ msgpairarray.h 30 Apr 2009 15:02:59 -0000 1.14.10.1
@@ -49,6 +49,11 @@ typedef struct PINT_sm_msgpair_state_s
/* server address */
PVFS_BMI_addr_t svr_addr;
+ /*session identifier between send and rcvs*/
+ /*note: server-side i/o machine uses the session_tag as the flow */
+ /*descriptor tag. */
+ bmi_msg_tag_t session_tag;
+
/* req and encoded_req are used to send a request */
struct PVFS_server_req req;
struct PINT_encoded_msg encoded_req;
Index: msgpairarray.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/msgpairarray.sm,v
diff -p -u -r1.51 -r1.51.10.1
--- msgpairarray.sm 20 Nov 2008 01:16:53 -0000 1.51
+++ msgpairarray.sm 30 Apr 2009 15:02:59 -0000 1.51.10.1
@@ -94,6 +94,10 @@ static PINT_sm_action msgpairarray_init(
int i = 0;
PINT_sm_msgpair_state *msg_p = NULL;
+ gossip_debug(GOSSIP_MIRROR_DEBUG,"Executing msgpairarray_init...\n");
+ gossip_debug(GOSSIP_MIRROR_DEBUG,"\tbase frame:%d\tframe count:%d\n"
+ ,smcb->base_frame,smcb->frame_count);
+
gossip_debug(GOSSIP_MSGPAIR_DEBUG, "(%p) msgpairarray state: init "
"(%d msgpair(s))\n", smcb, mop->count);
@@ -245,6 +249,10 @@ static PINT_sm_action msgpairarray_post(
session_tag = PINT_util_get_next_tag();
+ /*store the session tag for this msgpair, so the msgpair completion */
+ /*function can pass it to the caller of msgpairarray. */
+ msg_p->session_tag = session_tag;
+
gossip_debug(GOSSIP_MSGPAIR_DEBUG, "%s: sm %p msgpair %d: "
"posting recv\n", __func__, smcb, i);
@@ -488,6 +496,7 @@ static PINT_sm_action msgpairarray_compl
gossip_debug(GOSSIP_MSGPAIR_DEBUG, "(%p) msgpairarray state: "
"completion_fn\n", smcb);
+ gossip_debug(GOSSIP_MIRROR_DEBUG,"Executing msgpairarray_completion_fn..\n");
for (i = 0; i < mop->count; i++)
{
@@ -545,6 +554,7 @@ static PINT_sm_action msgpairarray_compl
*/
if (msg_p->comp_fn != NULL)
{
+ gossip_debug(GOSSIP_MIRROR_DEBUG,"\texecuting msg_p->comp_fn..\n");
/* If we call the completion function, store the result on
* a per message pair basis. Also store some non-zero
* (failure) value in js_p->error_code if we see one.
Index: pvfs2-debug.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pvfs2-debug.c,v
diff -p -u -r1.52 -r1.52.10.1
--- pvfs2-debug.c 11 Nov 2008 19:25:51 -0000 1.52
+++ pvfs2-debug.c 30 Apr 2009 15:02:59 -0000 1.52.10.1
@@ -112,6 +112,8 @@ static __keyword_mask_t s_keyword_mask_m
{ "fsck", GOSSIP_FSCK_DEBUG },
/* Debug the bstream code */
{ "bstream", GOSSIP_BSTREAM_DEBUG },
+ /* Debug mirroring operations */
+ { "mirror",GOSSIP_MIRROR_DEBUG },
/* Debug trove in direct io mode */
{"directio", GOSSIP_DIRECTIO_DEBUG},
/* Everything except the periodic events. Useful for debugging */
Index: pvfs2-internal.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pvfs2-internal.h,v
diff -p -u -r1.8 -r1.8.10.1
--- pvfs2-internal.h 8 Sep 2008 15:42:42 -0000 1.8
+++ pvfs2-internal.h 30 Apr 2009 15:03:00 -0000 1.8.10.1
@@ -93,6 +93,8 @@
#define SPECIAL_NUM_DFILES_KEYLEN 22
#define SPECIAL_METAFILE_HINT_KEYSTR "meta_hint\0"
#define SPECIAL_METAFILE_HINT_KEYLEN 21
+#define SPECIAL_MIRROR_PARAMS_KEYSTR "mirror\0"
+#define SPECIAL_MIRROR_PARAMS_KEYLEN 18
#define IO_MAX_REGIONS 64
Index: state-machine.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/state-machine.h,v
diff -p -u -r1.22 -r1.22.20.1
--- state-machine.h 2 Apr 2008 17:00:18 -0000 1.22
+++ state-machine.h 30 Apr 2009 15:03:00 -0000 1.22.20.1
@@ -50,6 +50,27 @@ enum PINT_state_code {
SM_RUN = 9
};
+/*define msgpairarray parameters for server-to-server requests*/
+#define PINT_serv_init_msgarray_params(sm_p, __fsid) \
+do { \
+ PINT_sm_msgpair_params *mpp = &sm_p->msgarray_op.params; \
+ struct server_configuration_s *server_config = \
+ get_server_config_struct(); \
+ mpp->job_context = server_job_context; \
+ if (server_config) \
+ { \
+ mpp->job_timeout = server_config->client_job_bmi_timeout; \
+ mpp->retry_limit = server_config->client_retry_limit; \
+ mpp->retry_delay = server_config->client_retry_delay_ms; \
+ } \
+ else \
+ { \
+ mpp->job_timeout = PVFS2_CLIENT_JOB_BMI_TIMEOUT_DEFAULT; \
+ mpp->retry_limit = PVFS2_CLIENT_RETRY_LIMIT_DEFAULT; \
+ mpp->retry_delay = PVFS2_CLIENT_RETRY_DELAY_MS_DEFAULT; \
+ } \
+} while (0)
+
/* these define things like stack size and so forth for the common
* state machine code.
* The state stack size limits the number of nested state machines that
@@ -203,8 +224,9 @@ void *PINT_sm_pop_frame(struct PINT_smcb
int *error_code,
int *remaining);
-/* This macro is used in calls to PINT_sm_fram() */
+/* This macro is used in calls to PINT_sm_frame() */
#define PINT_FRAME_CURRENT 0
+#define PINT_FRAME_TOP 1
struct PINT_state_machine_s pvfs2_void_sm;
More information about the Pvfs2-cvs
mailing list