[PVFS2-CVS]
commit by robl in pvfs2-1/src/apps/kernel/linux: pvfs2-client-core.c
CVS commit program
cvs at parl.clemson.edu
Thu Jun 16 11:53:51 EDT 2005
Update of /projects/cvsroot/pvfs2-1/src/apps/kernel/linux
In directory parlweb:/tmp/cvs-serv3366/src/apps/kernel/linux
Modified Files:
pvfs2-client-core.c
Log Message:
Phil's patch to return immediately when pvfs2-client posts an operation that
fails right away (i.e. ENAMETOOLONG). Otherwise, kernel has to wait for
timeout.
Index: pvfs2-client-core.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/apps/kernel/linux/pvfs2-client-core.c,v
diff -u -w -p -u -r1.44 -r1.45
--- pvfs2-client-core.c 13 Dec 2004 15:07:10 -0000 1.44
+++ pvfs2-client-core.c 16 Jun 2005 14:53:51 -0000 1.45
@@ -1667,6 +1667,7 @@ static inline PVFS_error handle_unexp_vf
vfs_request_t *vfs_request)
{
PVFS_error ret = -PVFS_EINVAL;
+ int posted_op = 0;
assert(vfs_request);
@@ -1737,33 +1738,43 @@ static inline PVFS_error handle_unexp_vf
switch(vfs_request->in_upcall.type)
{
case PVFS2_VFS_OP_LOOKUP:
+ posted_op = 1;
ret = post_lookup_request(vfs_request);
break;
case PVFS2_VFS_OP_CREATE:
+ posted_op = 1;
ret = post_create_request(vfs_request);
break;
case PVFS2_VFS_OP_SYMLINK:
+ posted_op = 1;
ret = post_symlink_request(vfs_request);
break;
case PVFS2_VFS_OP_GETATTR:
+ posted_op = 1;
ret = post_getattr_request(vfs_request);
break;
case PVFS2_VFS_OP_SETATTR:
+ posted_op = 1;
ret = post_setattr_request(vfs_request);
break;
case PVFS2_VFS_OP_REMOVE:
+ posted_op = 1;
ret = post_remove_request(vfs_request);
break;
case PVFS2_VFS_OP_MKDIR:
+ posted_op = 1;
ret = post_mkdir_request(vfs_request);
break;
case PVFS2_VFS_OP_READDIR:
+ posted_op = 1;
ret = post_readdir_request(vfs_request);
break;
case PVFS2_VFS_OP_RENAME:
+ posted_op = 1;
ret = post_rename_request(vfs_request);
break;
case PVFS2_VFS_OP_TRUNCATE:
+ posted_op = 1;
ret = post_truncate_request(vfs_request);
break;
/*
@@ -1785,6 +1796,7 @@ static inline PVFS_error handle_unexp_vf
blocking and handled inline
*/
case PVFS2_VFS_OP_FILE_IO:
+ posted_op = 1;
ret = post_io_request(vfs_request);
break;
#ifdef USE_MMAP_RA_CACHE
@@ -1800,6 +1812,7 @@ static inline PVFS_error handle_unexp_vf
ret = service_operation_cancellation(vfs_request);
break;
case PVFS2_VFS_OP_FSYNC:
+ posted_op = 1;
ret = post_fsync_request(vfs_request);
break;
case PVFS2_VFS_OP_INVALID:
@@ -1810,10 +1823,21 @@ static inline PVFS_error handle_unexp_vf
break;
}
+ /* if we failed to post the operation, then we should go ahead and write
+ * a generic response down with the error code filled in
+ */
+ if(posted_op == 1 && ret < 0)
+ {
+ vfs_request->out_downcall.status = ret;
+ /* this will treat the operation as if it were inlined in the logic
+ * to follow, which is what we want -- report a general error and
+ * immediately release the request */
+ write_inlined_device_response(vfs_request);
+ }
repost_op:
/*
check if we need to repost the operation (in case of failure or
- inlined handling/completion
+ inlined handling/completion)
*/
switch(ret)
{
More information about the PVFS2-CVS
mailing list