[PVFS2-CVS]
commit by neill in pvfs2/src/client/sysint: getparent.c sys-io.sm
CVS commit program
cvs at parl.clemson.edu
Tue May 11 14:21:47 EDT 2004
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb:/tmp/cvs-serv9667/src/client/sysint
Modified Files:
getparent.c sys-io.sm
Log Message:
- allow i/o attempts on non-files to not crash
- fix io-test program to handle real paths for testing
- gossip removal
Index: getparent.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/getparent.c,v
diff -p -u -r1.8 -r1.9
--- getparent.c 24 Mar 2004 23:10:30 -0000 1.8
+++ getparent.c 11 May 2004 17:21:47 -0000 1.9
@@ -33,7 +33,6 @@ int PVFS_sys_getparent(
{
gossip_err("Invalid dirname (no leading '/')\n");
}
- gossip_err("cannot get parent directory of %s\n",entry_name);
return ret;
}
Index: sys-io.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-io.sm,v
diff -p -u -r1.69 -r1.70
--- sys-io.sm 10 May 2004 18:40:07 -0000 1.69
+++ sys-io.sm 11 May 2004 17:21:47 -0000 1.70
@@ -331,14 +331,25 @@ static int io_datafile_setup_msgpairs(PI
attr = (sm_p->acache_hit ?
&sm_p->pinode->attr :
&sm_p->acache_attr);
-
assert(attr);
- assert(attr->objtype == PVFS_TYPE_METAFILE);
- assert(attr->mask & PVFS_ATTR_META_DFILES);
- assert(attr->mask & PVFS_ATTR_META_DIST);
- assert(attr->u.meta.dist_size > 0);
- assert(attr->u.meta.dfile_array);
- assert(attr->u.meta.dfile_count > 0);
+
+ switch(attr->objtype)
+ {
+ case PVFS_TYPE_METAFILE:
+ assert(attr->objtype == PVFS_TYPE_METAFILE);
+ assert(attr->mask & PVFS_ATTR_META_DFILES);
+ assert(attr->mask & PVFS_ATTR_META_DIST);
+ assert(attr->u.meta.dist_size > 0);
+ assert(attr->u.meta.dfile_array);
+ assert(attr->u.meta.dfile_count > 0);
+ break;
+ case PVFS_TYPE_DIRECTORY:
+ js_p->error_code = -PVFS_EISDIR;
+ return 1;
+ default:
+ js_p->error_code = -PVFS_EIO;
+ return 1;
+ }
/*
assign internal io ptrs for convenience here (without copying)
More information about the PVFS2-CVS
mailing list