[PVFS2-CVS]
commit by neill in pvfs2/src/client/sysint: shared-state-methods.c
sys-create.sm
CVS commit program
cvs at parl.clemson.edu
Thu Feb 19 13:35:26 EST 2004
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb:/tmp/cvs-serv12362/src/client/sysint
Modified Files:
shared-state-methods.c sys-create.sm
Log Message:
- better handle server mapping failures in create sm (need to go through
and make other state machines work in a similar manner to tolerate that
kind of failure)
Index: shared-state-methods.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/shared-state-methods.c,v
diff -p -u -r1.12 -r1.13
--- shared-state-methods.c 11 Feb 2004 23:14:46 -0000 1.12
+++ shared-state-methods.c 19 Feb 2004 18:35:26 -0000 1.13
@@ -51,8 +51,7 @@ int PINT_sm_common_parent_getattr_setup_
if (ret != 0)
{
gossip_err("Error: failure mapping to server.\n");
- assert(ret < 0); /* return value range check */
- assert(0); /* TODO: real error handling */
+ return -PVFS_EADDRNOTAVAIL;
}
js_p->error_code = 0;
@@ -100,8 +99,7 @@ int PINT_sm_common_object_getattr_setup_
if (ret != 0)
{
gossip_err("Error: failure mapping to server.\n");
- assert(ret < 0); /* return value range check */
- assert(0); /* TODO: real error handling */
+ return -PVFS_EADDRNOTAVAIL;
}
js_p->error_code = 0;
Index: sys-create.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-create.sm,v
diff -p -u -r1.26 -r1.27
--- sys-create.sm 19 Feb 2004 18:25:48 -0000 1.26
+++ sys-create.sm 19 Feb 2004 18:35:26 -0000 1.27
@@ -279,7 +279,11 @@ int PVFS_sys_create(
parent_refn.fs_id);
ret = PINT_client_state_machine_post(sm_p, PVFS_SYS_CREATE);
- assert(ret == 0);
+ if (ret)
+ {
+ free(sm_p);
+ return ret;
+ }
while (!sm_p->op_complete && ret == 0)
{
@@ -651,7 +655,7 @@ static int create_setattr_setup_msgpair(
msg_p->fs_id) < 0)
{
gossip_err("Failed to get meta server information\n");
- assert(0);
+ return -PVFS_EADDRNOTAVAIL;
}
return 1;
}
@@ -699,7 +703,7 @@ static int create_crdirent_setup_msgpair
if (ret < 0)
{
gossip_err("Failed to get meta server information\n");
- js_p->error_code = ret;
+ return -PVFS_EADDRNOTAVAIL;
}
return 1;
}
More information about the PVFS2-CVS
mailing list