[PVFS2-CVS] commit by neill in pvfs2/src/server: crdirent.sm get-attr.sm

CVS commit program cvs at parl.clemson.edu
Mon May 3 14:32:20 EDT 2004


Update of /projects/cvsroot/pvfs2/src/server
In directory parlweb:/tmp/cvs-serv27452/src/server

Modified Files:
	crdirent.sm get-attr.sm 
Log Message:
- more error handling
- more cleanups
- fixed the dbcache try_remove method after the last set of changes to it
  (must remove even if it's not in the cache)


Index: crdirent.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/crdirent.sm,v
diff -p -u -r1.33 -r1.34
--- crdirent.sm	18 Feb 2004 19:40:32 -0000	1.33
+++ crdirent.sm	3 May 2004 17:32:20 -0000	1.34
@@ -425,13 +425,12 @@ static int crdirent_write_directory_entr
  * Params:   server_op *s_op, 
  *           job_status_s* js_p
  *
- * Pre:      s_op->u.crdirent.dirent_handle is the directory entry k/v space
- *           s_op->req->u.crdirent.name != NULL
- *           s_op->req->u.crdirent.new_handle != NULL
- *           ADD ASSERTS FOR THESE!
+ * Pre: s_op->u.crdirent.dirent_handle is the directory entry k/v space
+ *      s_op->req->u.crdirent.name != NULL
+ *      s_op->req->u.crdirent.new_handle != NULL
  *
- * Post:     tries to read a directory entry, so that we can check to see if it
- *           already exists or not
+ * Post: tries to read a directory entry, so that we can check to see
+ * if it already exists or not
  *
  * Returns:  int
  *
@@ -442,8 +441,8 @@ static int crdirent_write_directory_entr
 static int crdirent_check_exist_directory_entry(PINT_server_op *s_op,
                                                 job_status_s* js_p)
 {
-    int ret;
-    job_id_t i;
+    int ret = -PVFS_EINVAL;
+    job_id_t i = 0;
 
     PINT_STATE_DEBUG("check_exist_directory_entry");
 

Index: get-attr.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/server/get-attr.sm,v
diff -p -u -r1.56 -r1.57
--- get-attr.sm	22 Apr 2004 19:13:01 -0000	1.56
+++ get-attr.sm	3 May 2004 17:32:20 -0000	1.57
@@ -323,8 +323,8 @@ static int getattr_read_symlink_target(
     s_op->key.buffer_sz = Trove_Common_Keys[SYMLINK_TARGET_KEY].size;
 
     /*
-      optimistically add mask value to indicate the
-      symlink target is filled (error_code is checked in next state
+      optimistically add mask value to indicate the symlink target is
+      filled (error_code is checked in next state)
     */
     s_op->resp.u.getattr.attr.mask |= PVFS_ATTR_SYMLNK_TARGET;
 
@@ -578,6 +578,7 @@ static int getattr_setup_resp(PINT_serve
             gossip_err("Failed to retrieve symlink target path for "
                        "handle %Lu,%d\n",Lu(s_op->req->u.getattr.handle),
                        s_op->req->u.getattr.fs_id);
+            PVFS_perror("Symlink retrieval failure",js_p->error_code);
 
             js_p->error_code = -PVFS_EINVAL;
             return 1;



More information about the PVFS2-CVS mailing list