[PVFS2-CVS]
commit by neill in pvfs2/src/server: crdirent.sm remove.sm
rmdirent.sm
CVS commit program
cvs at parl.clemson.edu
Wed Feb 18 12:38:29 EST 2004
Update of /projects/cvsroot/pvfs2/src/server
In directory parlweb:/tmp/cvs-serv8355/src/server
Modified Files:
crdirent.sm remove.sm rmdirent.sm
Log Message:
- added some debugging to get an idea of how the trove metadata syncs are
affecting us
- enforced the trove_sync_mode flag in a few more places, but being careful
to sync some operations that *must* be sync'd
- some cleanups
Index: crdirent.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/crdirent.sm,v
diff -p -u -r1.31 -r1.32
--- crdirent.sm 16 Feb 2004 23:08:22 -0000 1.31
+++ crdirent.sm 18 Feb 2004 17:38:29 -0000 1.32
@@ -222,17 +222,19 @@ static int crdirent_read_directory_entry
s_op->val.buffer = &s_op->u.crdirent.dirent_handle;
s_op->val.buffer_sz = sizeof(PVFS_handle);
- ret = job_trove_keyval_read(s_op->req->u.crdirent.fs_id,
- s_op->req->u.crdirent.parent_handle,
- &s_op->key,
- &s_op->val,
- 0,
- NULL,
- s_op,
- 0,
- js_p,
- &i,
- server_job_context);
+ ret = job_trove_keyval_read(
+ s_op->req->u.crdirent.fs_id,
+ s_op->req->u.crdirent.parent_handle,
+ &s_op->key,
+ &s_op->val,
+ 0,
+ NULL,
+ s_op,
+ 0,
+ js_p,
+ &i,
+ server_job_context);
+
return ret;
}
@@ -279,8 +281,8 @@ static int crdirent_create_dirdata_dspac
&extent_array,
PVFS_TYPE_DIRDATA,
NULL,
- PINT_config_get_trove_sync_mode(
- user_opts, s_op->req->u.crdirent.fs_id),
+ (PINT_config_get_trove_sync_mode(
+ user_opts, s_op->req->u.crdirent.fs_id) | TROVE_SYNC),
s_op,
0,
js_p,
@@ -312,6 +314,7 @@ static int crdirent_write_dirdata_handle
{
int ret;
job_id_t i;
+ struct server_configuration_s *user_opts = get_server_config_struct();
PINT_STATE_DEBUG("write_dirdata_handle");
@@ -335,17 +338,20 @@ static int crdirent_write_dirdata_handle
Lu(s_op->u.crdirent.dirent_handle),
Lu(s_op->req->u.crdirent.parent_handle));
- ret = job_trove_keyval_write(s_op->req->u.crdirent.fs_id,
- s_op->req->u.crdirent.parent_handle,
- &s_op->key,
- &s_op->val,
- TROVE_SYNC,
- NULL,
- s_op,
- 0,
- js_p,
- &i,
- server_job_context);
+ ret = job_trove_keyval_write(
+ s_op->req->u.crdirent.fs_id,
+ s_op->req->u.crdirent.parent_handle,
+ &s_op->key,
+ &s_op->val,
+ (PINT_config_get_trove_sync_mode(
+ user_opts, s_op->req->u.crdirent.fs_id) | TROVE_SYNC),
+ NULL,
+ s_op,
+ 0,
+ js_p,
+ &i,
+ server_job_context);
+
return ret;
}
@@ -373,6 +379,7 @@ static int crdirent_write_directory_entr
{
int ret;
job_id_t i;
+ struct server_configuration_s *user_opts = get_server_config_struct();
PINT_STATE_DEBUG("write_directory_entry");
@@ -395,17 +402,20 @@ static int crdirent_write_directory_entr
Lu(s_op->req->u.crdirent.new_handle),
Lu(s_op->u.crdirent.dirent_handle));
- ret = job_trove_keyval_write(s_op->req->u.crdirent.fs_id,
- s_op->u.crdirent.dirent_handle,
- &s_op->key,
- &s_op->val,
- TROVE_SYNC,
- NULL,
- s_op,
- 0,
- js_p,
- &i,
- server_job_context);
+ ret = job_trove_keyval_write(
+ s_op->req->u.crdirent.fs_id,
+ s_op->u.crdirent.dirent_handle,
+ &s_op->key,
+ &s_op->val,
+ (PINT_config_get_trove_sync_mode(
+ user_opts, s_op->req->u.crdirent.fs_id) | TROVE_SYNC),
+ NULL,
+ s_op,
+ 0,
+ js_p,
+ &i,
+ server_job_context);
+
return ret;
}
@@ -456,31 +466,33 @@ static int crdirent_check_exist_director
Lu(s_op->req->u.crdirent.new_handle),
Lu(s_op->u.crdirent.dirent_handle));
- ret = job_trove_keyval_read(s_op->req->u.crdirent.fs_id,
- s_op->u.crdirent.dirent_handle,
- &s_op->key,
- &s_op->val,
- TROVE_SYNC,
- NULL,
- s_op,
- 0,
- js_p,
- &i,
- server_job_context);
+ ret = job_trove_keyval_read(
+ s_op->req->u.crdirent.fs_id,
+ s_op->u.crdirent.dirent_handle,
+ &s_op->key,
+ &s_op->val,
+ 0,
+ NULL,
+ s_op,
+ 0,
+ js_p,
+ &i,
+ server_job_context);
+
return ret;
}
-
/*
* Function: crdirent_handle_eexist
*
* Params: server_op *s_op,
* job_status_s* js_p
*
- * Pre: crdirent_check_exist_directory entry has returned with successful return
- * code (js_p->error_code == 0)
+ * Pre: crdirent_check_exist_directory entry has returned with
+ * successful return code (js_p->error_code == 0)
*
- * Post: sets an appropriate return value (-EEXIST?) to send back to the client
+ * Post: sets an appropriate return value (-EEXIST?) to send back to
+ * the client
*
* Returns: int
*
Index: remove.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/remove.sm,v
diff -p -u -r1.33 -r1.34
--- remove.sm 16 Feb 2004 23:08:22 -0000 1.33
+++ remove.sm 18 Feb 2004 17:38:29 -0000 1.34
@@ -275,8 +275,8 @@ static int remove_remove_dirdata_dspace(
ret = job_trove_dspace_remove(
s_op->req->u.remove.fs_id,
s_op->u.remove.dirdata_handle,
- PINT_config_get_trove_sync_mode(
- user_opts, s_op->req->u.remove.fs_id),
+ (PINT_config_get_trove_sync_mode(
+ user_opts, s_op->req->u.remove.fs_id) | TROVE_SYNC),
s_op,
0,
js_p,
@@ -304,8 +304,8 @@ static int remove_remove_dspace(PINT_ser
ret = job_trove_dspace_remove(
s_op->req->u.remove.fs_id,
s_op->req->u.remove.handle,
- PINT_config_get_trove_sync_mode(
- user_opts, s_op->req->u.remove.fs_id),
+ (PINT_config_get_trove_sync_mode(
+ user_opts, s_op->req->u.remove.fs_id) | TROVE_SYNC),
s_op,
0,
js_p,
Index: rmdirent.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/rmdirent.sm,v
diff -p -u -r1.31 -r1.32
--- rmdirent.sm 16 Feb 2004 20:17:11 -0000 1.31
+++ rmdirent.sm 18 Feb 2004 17:38:29 -0000 1.32
@@ -131,17 +131,19 @@ static int rmdirent_verify_parent_metada
s_op->val.buffer,
s_op->val.buffer_sz);
- ret = job_trove_keyval_read(s_op->req->u.rmdirent.fs_id,
- s_op->req->u.rmdirent.parent_handle,
- &s_op->key,
- &s_op->val,
- 0,
- NULL,
- s_op,
- 0,
- js_p,
- &i,
- server_job_context);
+ ret = job_trove_keyval_read(
+ s_op->req->u.rmdirent.fs_id,
+ s_op->req->u.rmdirent.parent_handle,
+ &s_op->key,
+ &s_op->val,
+ 0,
+ NULL,
+ s_op,
+ 0,
+ js_p,
+ &i,
+ server_job_context);
+
return ret;
}
@@ -174,17 +176,19 @@ static int rmdirent_read_directory_entry
s_op->val.buffer = &s_op->u.rmdirent.entry_handle;
s_op->val.buffer_sz = sizeof(PVFS_handle);
- ret = job_trove_keyval_read(s_op->req->u.rmdirent.fs_id,
- s_op->u.rmdirent.dirdata_handle,
- &s_op->key,
- &s_op->val,
- 0,
- NULL,
- s_op,
- 0,
- js_p,
- &j_id,
- server_job_context);
+ ret = job_trove_keyval_read(
+ s_op->req->u.rmdirent.fs_id,
+ s_op->u.rmdirent.dirdata_handle,
+ &s_op->key,
+ &s_op->val,
+ 0,
+ NULL,
+ s_op,
+ 0,
+ js_p,
+ &j_id,
+ server_job_context);
+
return ret;
}
@@ -228,6 +232,7 @@ static int rmdirent_remove_directory_ent
{
int ret;
job_id_t j_id;
+ struct server_configuration_s *user_opts = get_server_config_struct();
PINT_STATE_DEBUG("remove_directory_entry");
@@ -245,7 +250,8 @@ static int rmdirent_remove_directory_ent
s_op->req->u.rmdirent.fs_id,
s_op->u.rmdirent.dirdata_handle,
&s_op->key,
- TROVE_SYNC,
+ (PINT_config_get_trove_sync_mode(
+ user_opts, s_op->req->u.rmdirent.fs_id) | TROVE_SYNC),
NULL,
s_op,
0,
More information about the PVFS2-CVS
mailing list