[PVFS2-CVS]
commit by neill in pvfs2/src/kernel/linux-2.6: downcall.h
pvfs2-kernel.h pvfs2-utils.c
CVS commit program
cvs at parl.clemson.edu
Mon Oct 25 11:56:36 EDT 2004
Update of /projects/cvsroot/pvfs2/src/kernel/linux-2.6
In directory parlweb:/tmp/cvs-serv30553/src/kernel/linux-2.6
Modified Files:
downcall.h pvfs2-kernel.h pvfs2-utils.c
Log Message:
- error code type cleanup that may fix Nathan's 64bit kernel oops (probably
a bad cast); but may cause additional compilation warnings
Index: downcall.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/downcall.h,v
diff -p -u -r1.19 -r1.20
--- downcall.h 19 Oct 2004 18:53:39 -0000 1.19
+++ downcall.h 25 Oct 2004 14:56:36 -0000 1.20
@@ -101,7 +101,7 @@ typedef struct
typedef struct
{
int type;
- int status;
+ PVFS_error status;
union
{
@@ -122,8 +122,6 @@ typedef struct
/* pvfs2_cancel_response_t cancel; */
} resp;
} pvfs2_downcall_t;
-
-
#endif /* __DOWNCALL_H */
Index: pvfs2-kernel.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-kernel.h,v
diff -p -u -r1.78 -r1.79
--- pvfs2-kernel.h 19 Oct 2004 20:22:36 -0000 1.78
+++ pvfs2-kernel.h 25 Oct 2004 14:56:36 -0000 1.79
@@ -383,8 +383,8 @@ int pvfs2_truncate_inode(
struct inode *inode,
loff_t size);
-int pvfs2_kernel_error_code_convert(
- int pvfs2_error_code);
+PVFS_error pvfs2_kernel_error_code_convert(
+ PVFS_error pvfs2_error_code);
void pvfs2_inode_initialize(
pvfs2_inode_t *pvfs2_inode);
Index: pvfs2-utils.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-utils.c,v
diff -p -u -r1.92 -r1.93
--- pvfs2-utils.c 19 Oct 2004 19:32:04 -0000 1.92
+++ pvfs2-utils.c 25 Oct 2004 14:56:36 -0000 1.93
@@ -971,8 +971,7 @@ int pvfs2_cancel_op_in_progress(unsigned
/* macro defined in include/pvfs2-types.h */
DECLARE_ERRNO_MAPPING_AND_FN();
-int pvfs2_kernel_error_code_convert(
- int pvfs2_error_code)
+PVFS_error pvfs2_kernel_error_code_convert(PVFS_error pvfs2_error_code)
{
if ((pvfs2_error_code == PVFS2_WAIT_TIMEOUT_REACHED) ||
(pvfs2_error_code == PVFS2_WAIT_SIGNAL_RECVD))
@@ -982,17 +981,20 @@ int pvfs2_kernel_error_code_convert(
if (IS_PVFS_NON_ERRNO_ERROR(pvfs2_error_code))
{
- int ret = -EPERM;
- int index = PVFS_get_errno_mapping((int32_t)pvfs2_error_code);
+ PVFS_error ret = -EPERM;
+ int index = PVFS_get_errno_mapping(pvfs2_error_code);
switch(PINT_non_errno_mapping[index])
{
case PVFS_ECANCEL:
ret = -EINTR;
break;
+ default:
+ pvfs2_error("Unhandled pvfs2 error code: %d\n",
+ pvfs2_error_code);
}
return ret;
}
- return (int)PVFS_get_errno_mapping((int32_t)pvfs2_error_code);
+ return PVFS_get_errno_mapping(pvfs2_error_code);
}
void pvfs2_inode_initialize(pvfs2_inode_t *pvfs2_inode)
More information about the PVFS2-CVS
mailing list