[Pvfs2-cvs] commit by dbonnie in pvfs2/src/server: list-attr.sm
pvfs2-server.c pvfs2-server.h
CVS commit program
cvs at parl.clemson.edu
Fri May 16 11:15:53 EDT 2008
Update of /anoncvs/pvfs2/src/server
In directory parlweb1:/tmp/cvs-serv1762/src/server
Modified Files:
Tag: cu-security-branch
list-attr.sm pvfs2-server.c pvfs2-server.h
Log Message:
Updated branch with code from HEAD
Index: list-attr.sm
===================================================================
RCS file: /anoncvs/pvfs2/src/server/list-attr.sm,v
diff -p -u -r1.10 -r1.10.2.1
--- list-attr.sm 14 Mar 2008 17:54:33 -0000 1.10
+++ list-attr.sm 16 May 2008 15:15:53 -0000 1.10.2.1
@@ -206,31 +206,16 @@ static PINT_sm_action listattr_interpret
job_status_s *js_p)
{
struct PINT_server_op *getattr_op;
- struct PINT_server_op *s_op;
+ /* note: this gives us a pointer to the base frame (list_attr),
+ * _not_ the getattr frames that were previously pushed.
+ */
+ struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT);
int task_id;
int remaining;
PVFS_error tmp_err;
int i, j;
- int listattr_index = 0;
-
- /* we need to find the frame of the parent sm first so that we can
- * store the results of the parallel machines.
- */
- /* TODO: is there a cleaner way to do this? I don't know how to tell
- * how many frames were pushed without first iterating and looking for
- * the original s_op
- */
- do
- {
- s_op = PINT_sm_frame(smcb, listattr_index);
- listattr_index++;
- } while(s_op && s_op->op != PVFS_SERV_LISTATTR);
assert(s_op);
- /* the position in the stack should match the number of parallel
- * machines we pushed on top of it
- */
- assert(s_op->u.listattr.parallel_sms == (listattr_index-1));
assert(s_op->op == PVFS_SERV_LISTATTR);
gossip_debug(GOSSIP_SERVER_DEBUG,
Index: pvfs2-server.c
===================================================================
RCS file: /anoncvs/pvfs2/src/server/pvfs2-server.c,v
diff -p -u -r1.251 -r1.251.2.1
--- pvfs2-server.c 12 Mar 2008 14:45:12 -0000 1.251
+++ pvfs2-server.c 16 May 2008 15:15:53 -0000 1.251.2.1
@@ -43,6 +43,7 @@
#include "pint-cached-config.h"
#include "pvfs2-internal.h"
#include "src/server/request-scheduler/request-scheduler.h"
+#include "pint-util.h"
#ifndef PVFS2_VERSION
#define PVFS2_VERSION "Unknown"
@@ -156,7 +157,6 @@ static int create_pidfile(char *pidfile)
static void write_pidfile(int fd);
static void remove_pidfile(void);
static int generate_shm_key_hint(void);
-static char *guess_alias(void);
static TROVE_method_id trove_coll_to_method_callback(TROVE_coll_id);
@@ -1464,7 +1464,7 @@ static int server_parse_cmd_line_args(in
if (s_server_options.server_alias == NULL)
{
/* Try to guess the alias from the hostname */
- s_server_options.server_alias = guess_alias();
+ s_server_options.server_alias = PINT_util_guess_alias();
}
return 0;
}
@@ -1837,34 +1837,6 @@ void PINT_server_access_debug(PINT_serve
}
}
#endif
-
-static char *guess_alias(void)
-{
- char tmp_alias[1024];
- char *tmpstr;
- char *alias;
- int ret;
-
- /* hmm...failed to find alias as part of the server config filename,
- * use the hostname to guess
- */
- ret = gethostname(tmp_alias, 1024);
- if(ret != 0)
- {
- gossip_err("Failed to get hostname while attempting to guess "
- "alias. Use -a to specify the alias for this server "
- "process directly\n");
- return NULL;
- }
- alias = tmp_alias;
-
- tmpstr = strstr(tmp_alias, ".");
- if(tmpstr)
- {
- *tmpstr = 0;
- }
- return strdup(tmp_alias);
-}
/* generate_shm_key_hint()
*
Index: pvfs2-server.h
===================================================================
RCS file: /anoncvs/pvfs2/src/server/pvfs2-server.h,v
diff -p -u -r1.150 -r1.150.2.1
--- pvfs2-server.h 13 Mar 2008 15:33:21 -0000 1.150
+++ pvfs2-server.h 16 May 2008 15:15:53 -0000 1.150.2.1
@@ -32,12 +32,6 @@
#include "pvfs2-req-proto.h"
#include "state-machine.h"
-/* skip everything except #includes if __SM_CHECK_DEP is already
- * defined; this allows us to get the dependencies right for
- * msgpairarray.sm which relies on conflicting headers for dependency
- * information
- */
-#ifndef __SM_CHECK_DEP
extern job_context_id server_job_context;
#define PVFS2_SERVER_DEFAULT_TIMEOUT_MS 100
@@ -76,18 +70,6 @@ enum PINT_server_req_permissions
needs write and execute */
};
-enum PINT_server_req_access_type
-{
- PINT_SERVER_REQ_READONLY = 0,
- PINT_SERVER_REQ_MODIFY
-};
-
-enum PINT_server_sched_policy
-{
- PINT_SERVER_REQ_BYPASS = 0,
- PINT_SERVER_REQ_SCHEDULE
-};
-
#define PINT_GET_OBJECT_REF_DEFINE(req_name) \
static inline int PINT_get_object_ref_##req_name( \
struct PVFS_server_req *req, PVFS_fs_id *fs_id, PVFS_handle *handle) \
@@ -402,13 +384,7 @@ typedef struct PINT_server_op
struct PINT_encoded_msg encoded;
struct PINT_decoded_msg decoded;
- /* generic msgpair used with msgpair substate */
- PINT_sm_msgpair_state msgpair;
-
- /* state information for msgpairarray nested state machine */
- int msgarray_count;
- PINT_sm_msgpair_state *msgarray;
- PINT_sm_msgpair_params msgarray_params;
+ PINT_sm_msgarray_op msgarray_op;
PVFS_handle target_handle;
PVFS_fs_id target_fs_id;
@@ -500,7 +476,6 @@ int server_state_machine_start_noreq(
struct PINT_state_machine_s *server_op_state_get_machine(int);
-#endif /* __SM_CHECK_DEP */
#endif /* __PVFS_SERVER_H */
/*
More information about the Pvfs2-cvs
mailing list