[Pvfs2-cvs] commit by slang in pvfs2/src/proto: pvfs2-req-proto.h
CVS commit program
cvs at parl.clemson.edu
Mon Feb 11 12:25:29 EST 2008
Update of /projects/cvsroot/pvfs2/src/proto
In directory parlweb1:/tmp/cvs-serv5344/src/proto
Modified Files:
pvfs2-req-proto.h
Log Message:
The normal path for a server request operation is to jump to the prelude state machine, which tries schedule the request based on the handle+fsid. This meant that the request scheduler code had a switch/case returning the handle+fsid for each request we defined. The function was also overloaded with a readonly parameter (whether the request modified any objects on the server), and a scheduling policy parameter (as the return code), which specified whether the request scheduling could be bypassed for this request.
I moved all that to a per-request parameter structure, that gets specified within the server state machine for the request. Now there is one array of server requests (moved to pvfs2-server-req.c) which the request scheduler and prelude state machine can poke at to get parameters (defined in the state machine for that request), and based decisions on.
The patch includes some other minor changes:
* A fix to the BMI addr ref count increment/decrement. Previously, the addr ref count was being incremented/decremented in the prelude/final-response state machines. That requires that those state machines get invoked, which I don't want to have to depend on. I've moved the INC call to the unexpected_sm, and the DEC call to where the state machine gets finished in the server. That way we don't have to worry about whether we're using prelude/final-response.
* Cleanup of the request scheduler. The way we were changing the mode from normal to admin was sort of embedded into the request scheduling code, so we had to hack the mode change from prelude_sm instead of in setparam. Also, the request scheduler had to be aware of the setparam fields in the request. I've moved the mode change code to separate request scheduler and job calls. I think something similar could be done for the timer code (it doesn't really belong in the request scheduler), but I'll leave that for another patch.
* Changed the way we compile the server binary in Makefile.in to allow for multiple object files.
Index: pvfs2-req-proto.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/proto/pvfs2-req-proto.h,v
diff -p -u -r1.151 -r1.152
--- pvfs2-req-proto.h 17 Aug 2007 04:04:27 -0000 1.151
+++ pvfs2-req-proto.h 11 Feb 2008 17:25:29 -0000 1.152
@@ -408,7 +408,7 @@ struct PVFS_servreq_lookup_path
{
char *path; /* path name */
PVFS_fs_id fs_id; /* file system */
- PVFS_handle starting_handle; /* handle of path parent */
+ PVFS_handle handle; /* handle of path parent */
/* mask of attribs to return with lookup results */
uint32_t attrmask;
};
@@ -417,7 +417,7 @@ endecode_fields_5_struct(
string, path,
PVFS_fs_id, fs_id,
skip4,,
- PVFS_handle, starting_handle,
+ PVFS_handle, handle,
uint32_t, attrmask)
#define extra_size_PVFS_servreq_lookup_path \
roundup8(PVFS_REQ_LIMIT_PATH_NAME_BYTES + 1)
@@ -434,7 +434,7 @@ do {
(__req).credentials = (__creds); \
(__req).u.lookup_path.path = (__path); \
(__req).u.lookup_path.fs_id = (__fsid); \
- (__req).u.lookup_path.starting_handle = (__handle);\
+ (__req).u.lookup_path.handle = (__handle);\
(__req).u.lookup_path.attrmask = (__amask); \
} while (0)
@@ -519,14 +519,14 @@ struct PVFS_servreq_crdirent
{
char *name; /* name of new entry */
PVFS_handle new_handle; /* handle of new entry */
- PVFS_handle parent_handle; /* handle of directory */
+ PVFS_handle handle; /* handle of directory */
PVFS_fs_id fs_id; /* file system */
};
endecode_fields_4_struct(
PVFS_servreq_crdirent,
string, name,
PVFS_handle, new_handle,
- PVFS_handle, parent_handle,
+ PVFS_handle, handle,
PVFS_fs_id, fs_id)
#define extra_size_PVFS_servreq_crdirent \
roundup8(PVFS_REQ_LIMIT_SEGMENT_BYTES+1)
@@ -535,7 +535,7 @@ endecode_fields_4_struct(
__creds, \
__name, \
__new_handle, \
- __parent_handle, \
+ __handle, \
__fs_id) \
do { \
memset(&(__req), 0, sizeof(__req)); \
@@ -543,8 +543,8 @@ do {
(__req).credentials = (__creds); \
(__req).u.crdirent.name = (__name); \
(__req).u.crdirent.new_handle = (__new_handle); \
- (__req).u.crdirent.parent_handle = \
- (__parent_handle); \
+ (__req).u.crdirent.handle = \
+ (__handle); \
(__req).u.crdirent.fs_id = (__fs_id); \
} while (0)
@@ -554,13 +554,13 @@ do {
struct PVFS_servreq_rmdirent
{
char *entry; /* name of entry to remove */
- PVFS_handle parent_handle; /* handle of directory */
+ PVFS_handle handle; /* handle of directory */
PVFS_fs_id fs_id; /* file system */
};
endecode_fields_3_struct(
PVFS_servreq_rmdirent,
string, entry,
- PVFS_handle, parent_handle,
+ PVFS_handle, handle,
PVFS_fs_id, fs_id)
#define extra_size_PVFS_servreq_rmdirent \
roundup8(PVFS_REQ_LIMIT_SEGMENT_BYTES+1)
@@ -575,7 +575,7 @@ do {
(__req).op = PVFS_SERV_RMDIRENT; \
(__req).credentials = (__creds); \
(__req).u.rmdirent.fs_id = (__fsid); \
- (__req).u.rmdirent.parent_handle = (__handle);\
+ (__req).u.rmdirent.handle = (__handle); \
(__req).u.rmdirent.entry = (__entry); \
} while (0);
@@ -594,14 +594,14 @@ struct PVFS_servreq_chdirent
{
char *entry; /* name of entry to remove */
PVFS_handle new_dirent_handle; /* handle of directory */
- PVFS_handle parent_handle; /* handle of directory */
+ PVFS_handle handle; /* handle of directory */
PVFS_fs_id fs_id; /* file system */
};
endecode_fields_4_struct(
PVFS_servreq_chdirent,
string, entry,
PVFS_handle, new_dirent_handle,
- PVFS_handle, parent_handle,
+ PVFS_handle, handle,
PVFS_fs_id, fs_id)
#define extra_size_PVFS_servreq_chdirent \
roundup8(PVFS_REQ_LIMIT_SEGMENT_BYTES+1)
@@ -609,7 +609,7 @@ endecode_fields_4_struct(
#define PINT_SERVREQ_CHDIRENT_FILL(__req, \
__creds, \
__fsid, \
- __parent_handle,\
+ __handle, \
__new_dirent, \
__entry) \
do { \
@@ -617,8 +617,8 @@ do {
(__req).op = PVFS_SERV_CHDIRENT; \
(__req).credentials = (__creds); \
(__req).u.chdirent.fs_id = (__fsid); \
- (__req).u.chdirent.parent_handle = \
- (__parent_handle); \
+ (__req).u.chdirent.handle = \
+ (__handle); \
(__req).u.chdirent.new_dirent_handle = \
(__new_dirent); \
(__req).u.chdirent.entry = (__entry); \
More information about the Pvfs2-cvs
mailing list