aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2015-10-05 13:44:24 -0400
committerMike Marshall <hubcap@omnibond.com>2015-10-05 13:44:24 -0400
commit548049495cb46348866aec1cb7721e9d00b4eb83 (patch)
tree6639252c4bf27d47dc3e10e3390b1c7bff4bd784
parent894ac432b48bb64fabae31fd2f373b2b8659350f (diff)
Orangefs: fix some checkpatch.pl complaints that had creeped in.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
-rw-r--r--fs/orangefs/devpvfs2-req.c6
-rw-r--r--fs/orangefs/dir.c2
-rw-r--r--fs/orangefs/downcall.h2
-rw-r--r--fs/orangefs/file.c25
-rw-r--r--fs/orangefs/inode.c24
-rw-r--r--fs/orangefs/protocol.h32
-rw-r--r--fs/orangefs/pvfs2-bufmap.c10
-rw-r--r--fs/orangefs/pvfs2-debug.h6
-rw-r--r--fs/orangefs/pvfs2-kernel.h9
-rw-r--r--fs/orangefs/pvfs2-mod.c10
-rw-r--r--fs/orangefs/pvfs2-utils.c87
11 files changed, 111 insertions, 102 deletions
diff --git a/fs/orangefs/devpvfs2-req.c b/fs/orangefs/devpvfs2-req.c
index 13878cac49ed..ede842f05b62 100644
--- a/fs/orangefs/devpvfs2-req.c
+++ b/fs/orangefs/devpvfs2-req.c
@@ -476,9 +476,9 @@ static ssize_t pvfs2_devreq_writev(struct file *file,
476 set_op_state_serviced(op); 476 set_op_state_serviced(op);
477 spin_unlock(&op->lock); 477 spin_unlock(&op->lock);
478 /* 478 /*
479 for every other operation (i.e. non-I/O), we need to 479 * for every other operation (i.e. non-I/O), we need to
480 wake up the callers for downcall completion 480 * wake up the callers for downcall completion
481 notification 481 * notification
482 */ 482 */
483 wake_up_interruptible(&op->waitq); 483 wake_up_interruptible(&op->waitq);
484 } 484 }
diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c
index 3870e78f5ecf..daf497384501 100644
--- a/fs/orangefs/dir.c
+++ b/fs/orangefs/dir.c
@@ -289,7 +289,7 @@ get_new_buffer_index:
289 289
290 } 290 }
291 291
292 /* 292 /*
293 * we ran all the way through the last batch, set up for 293 * we ran all the way through the last batch, set up for
294 * getting another batch... 294 * getting another batch...
295 */ 295 */
diff --git a/fs/orangefs/downcall.h b/fs/orangefs/downcall.h
index a79129f875f3..f8bea46e7c6a 100644
--- a/fs/orangefs/downcall.h
+++ b/fs/orangefs/downcall.h
@@ -107,7 +107,7 @@ struct pvfs2_downcall_s {
107 __s32 status; 107 __s32 status;
108 /* currently trailer is used only by readdir */ 108 /* currently trailer is used only by readdir */
109 __s64 trailer_size; 109 __s64 trailer_size;
110 char * trailer_buf; 110 char *trailer_buf;
111 111
112 union { 112 union {
113 struct pvfs2_io_response io; 113 struct pvfs2_io_response io;
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 87f718163d1b..feb1764c2f80 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -54,7 +54,6 @@ static int precopy_buffers(struct pvfs2_bufmap *bufmap,
54 gossip_err("%s: Failed to copy-in buffers. Please make sure that the pvfs2-client is running. %ld\n", 54 gossip_err("%s: Failed to copy-in buffers. Please make sure that the pvfs2-client is running. %ld\n",
55 __func__, 55 __func__,
56 (long)ret); 56 (long)ret);
57
58 } 57 }
59 58
60 if (ret < 0) 59 if (ret < 0)
@@ -199,9 +198,9 @@ populate_shared_memory:
199 if (ret < 0) { 198 if (ret < 0) {
200 handle_io_error(); /* defined in pvfs2-kernel.h */ 199 handle_io_error(); /* defined in pvfs2-kernel.h */
201 /* 200 /*
202 don't write an error to syslog on signaled operation 201 * don't write an error to syslog on signaled operation
203 termination unless we've got debugging turned on, as 202 * termination unless we've got debugging turned on, as
204 this can happen regularly (i.e. ctrl-c) 203 * this can happen regularly (i.e. ctrl-c)
205 */ 204 */
206 if (ret == -EINTR) 205 if (ret == -EINTR)
207 gossip_debug(GOSSIP_FILE_DEBUG, 206 gossip_debug(GOSSIP_FILE_DEBUG,
@@ -245,10 +244,10 @@ populate_shared_memory:
245 ret = new_op->downcall.resp.io.amt_complete; 244 ret = new_op->downcall.resp.io.amt_complete;
246 245
247 /* 246 /*
248 tell the device file owner waiting on I/O that this read has 247 * tell the device file owner waiting on I/O that this read has
249 completed and it can return now. in this exact case, on 248 * completed and it can return now. in this exact case, on
250 wakeup the daemon will free the op, so we *cannot* touch it 249 * wakeup the daemon will free the op, so we *cannot* touch it
251 after this. 250 * after this.
252 */ 251 */
253 wake_up_daemon_for_return(new_op); 252 wake_up_daemon_for_return(new_op);
254 new_op = NULL; 253 new_op = NULL;
@@ -875,9 +874,9 @@ static int pvfs2_file_release(struct inode *inode, struct file *file)
875 pvfs2_flush_inode(inode); 874 pvfs2_flush_inode(inode);
876 875
877 /* 876 /*
878 remove all associated inode pages from the page cache and mmap 877 * remove all associated inode pages from the page cache and mmap
879 readahead cache (if any); this forces an expensive refresh of 878 * readahead cache (if any); this forces an expensive refresh of
880 data for the next caller of mmap (or 'get_block' accesses) 879 * data for the next caller of mmap (or 'get_block' accesses)
881 */ 880 */
882 if (file->f_path.dentry->d_inode && 881 if (file->f_path.dentry->d_inode &&
883 file->f_path.dentry->d_inode->i_mapping && 882 file->f_path.dentry->d_inode->i_mapping &&
@@ -960,8 +959,8 @@ static loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
960 } 959 }
961 960
962 gossip_debug(GOSSIP_FILE_DEBUG, 961 gossip_debug(GOSSIP_FILE_DEBUG,
963 "pvfs2_file_llseek: offset is %ld | origin is %d | " 962 "pvfs2_file_llseek: offset is %ld | origin is %d"
964 "inode size is %lu\n", 963 " | inode size is %lu\n",
965 (long)offset, 964 (long)offset,
966 origin, 965 origin,
967 (unsigned long)file->f_path.dentry->d_inode->i_size); 966 (unsigned long)file->f_path.dentry->d_inode->i_size);
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 9ff6b2985240..4f7c45a44c1f 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -128,18 +128,18 @@ static int pvfs2_releasepage(struct page *page, gfp_t foo)
128 * AIO. Modeled after NFS, they do this too. 128 * AIO. Modeled after NFS, they do this too.
129 */ 129 */
130/* 130/*
131static ssize_t pvfs2_direct_IO(int rw, 131 * static ssize_t pvfs2_direct_IO(int rw,
132 struct kiocb *iocb, 132 * struct kiocb *iocb,
133 struct iov_iter *iter, 133 * struct iov_iter *iter,
134 loff_t offset) 134 * loff_t offset)
135{ 135 *{
136 gossip_debug(GOSSIP_INODE_DEBUG, 136 * gossip_debug(GOSSIP_INODE_DEBUG,
137 "pvfs2_direct_IO: %s\n", 137 * "pvfs2_direct_IO: %s\n",
138 iocb->ki_filp->f_path.dentry->d_name.name); 138 * iocb->ki_filp->f_path.dentry->d_name.name);
139 139 *
140 return -EINVAL; 140 * return -EINVAL;
141} 141 *}
142*/ 142 */
143 143
144struct backing_dev_info pvfs2_backing_dev_info = { 144struct backing_dev_info pvfs2_backing_dev_info = {
145 .name = "pvfs2", 145 .name = "pvfs2",
diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h
index b374c4b2009e..85f611fe0536 100644
--- a/fs/orangefs/protocol.h
+++ b/fs/orangefs/protocol.h
@@ -101,22 +101,30 @@ typedef __s64 PVFS_offset;
101 101
102#define PVFS2_SUPER_MAGIC 0x20030528 102#define PVFS2_SUPER_MAGIC 0x20030528
103 103
104/* PVFS2 error codes are a signed 32-bit integer. Error codes are negative, but 104/*
105 * the sign is stripped before decoding. */ 105 * PVFS2 error codes are a signed 32-bit integer. Error codes are negative, but
106 * the sign is stripped before decoding.
107 */
106 108
107/* Bit 31 is not used since it is the sign. */ 109/* Bit 31 is not used since it is the sign. */
108 110
109/* Bit 30 specifies that this is a PVFS2 error. A PVFS2 error is either an 111/*
110 * encoded errno value or a PVFS2 protocol error. */ 112 * Bit 30 specifies that this is a PVFS2 error. A PVFS2 error is either an
113 * encoded errno value or a PVFS2 protocol error.
114 */
111#define PVFS_ERROR_BIT (1 << 30) 115#define PVFS_ERROR_BIT (1 << 30)
112 116
113/* Bit 29 specifies that this is a PVFS2 protocol error and not an encoded 117/*
114 * errno value. */ 118 * Bit 29 specifies that this is a PVFS2 protocol error and not an encoded
119 * errno value.
120 */
115#define PVFS_NON_ERRNO_ERROR_BIT (1 << 29) 121#define PVFS_NON_ERRNO_ERROR_BIT (1 << 29)
116 122
117/* Bits 9, 8, and 7 specify the error class, which encodes the section of 123/*
124 * Bits 9, 8, and 7 specify the error class, which encodes the section of
118 * server code the error originated in for logging purposes. It is not used 125 * server code the error originated in for logging purposes. It is not used
119 * in the kernel except to be masked out. */ 126 * in the kernel except to be masked out.
127 */
120#define PVFS_ERROR_CLASS_BITS 0x380 128#define PVFS_ERROR_CLASS_BITS 0x380
121 129
122/* Bits 6 - 0 are reserved for the actual error code. */ 130/* Bits 6 - 0 are reserved for the actual error code. */
@@ -388,14 +396,8 @@ enum {
388 396
389/* 397/*
390 * version number for use in communicating between kernel space and user 398 * version number for use in communicating between kernel space and user
391 * space 399 * space. Zero signifies the upstream version of the kernel module.
392 */ 400 */
393/*
394#define PVFS_KERNEL_PROTO_VERSION \
395 ((PVFS2_VERSION_MAJOR * 10000) + \
396 (PVFS2_VERSION_MINOR * 100) + \
397 PVFS2_VERSION_SUB)
398*/
399#define PVFS_KERNEL_PROTO_VERSION 0 401#define PVFS_KERNEL_PROTO_VERSION 0
400 402
401/* 403/*
diff --git a/fs/orangefs/pvfs2-bufmap.c b/fs/orangefs/pvfs2-bufmap.c
index e01e220fd5d7..9d0392a3e824 100644
--- a/fs/orangefs/pvfs2-bufmap.c
+++ b/fs/orangefs/pvfs2-bufmap.c
@@ -508,9 +508,9 @@ void readdir_index_put(struct pvfs2_bufmap *bufmap, int buffer_index)
508} 508}
509 509
510int pvfs_bufmap_copy_from_iovec(struct pvfs2_bufmap *bufmap, 510int pvfs_bufmap_copy_from_iovec(struct pvfs2_bufmap *bufmap,
511 struct iov_iter *iter, 511 struct iov_iter *iter,
512 int buffer_index, 512 int buffer_index,
513 size_t size) 513 size_t size)
514{ 514{
515 struct pvfs_bufmap_desc *to; 515 struct pvfs_bufmap_desc *to;
516 struct page *page; 516 struct page *page;
@@ -553,7 +553,7 @@ int pvfs_bufmap_copy_to_iovec(struct pvfs2_bufmap *bufmap,
553 "%s: buffer_index:%d: iov_iter_count(iter):%lu:\n", 553 "%s: buffer_index:%d: iov_iter_count(iter):%lu:\n",
554 __func__, buffer_index, iov_iter_count(iter)); 554 __func__, buffer_index, iov_iter_count(iter));
555 555
556 from = &bufmap->desc_array[buffer_index]; 556 from = &bufmap->desc_array[buffer_index];
557 557
558 for (i = 0; iov_iter_count(iter); i++) { 558 for (i = 0; iov_iter_count(iter); i++) {
559 page = from->page_array[i]; 559 page = from->page_array[i];
@@ -562,5 +562,5 @@ int pvfs_bufmap_copy_to_iovec(struct pvfs2_bufmap *bufmap,
562 break; 562 break;
563 } 563 }
564 564
565 return iov_iter_count(iter) ? -EFAULT : 0; 565 return iov_iter_count(iter) ? -EFAULT : 0;
566} 566}
diff --git a/fs/orangefs/pvfs2-debug.h b/fs/orangefs/pvfs2-debug.h
index 4c27ad77fa16..fd71d6c84cf6 100644
--- a/fs/orangefs/pvfs2-debug.h
+++ b/fs/orangefs/pvfs2-debug.h
@@ -180,8 +180,10 @@ static struct __keyword_mask_s s_keyword_mask_map[] = {
180 {"readdir", GOSSIP_READDIR_DEBUG}, 180 {"readdir", GOSSIP_READDIR_DEBUG},
181 /* Debug the mkdir operation (server only) */ 181 /* Debug the mkdir operation (server only) */
182 {"mkdir", GOSSIP_MKDIR_DEBUG}, 182 {"mkdir", GOSSIP_MKDIR_DEBUG},
183 /* Debug the io operation (reads and writes) 183 /*
184 * for both the client and server */ 184 * Debug the io operation (reads and writes)
185 * for both the client and server.
186 */
185 {"io", GOSSIP_IO_DEBUG}, 187 {"io", GOSSIP_IO_DEBUG},
186 /* Debug the server's open file descriptor cache */ 188 /* Debug the server's open file descriptor cache */
187 {"open_cache", GOSSIP_DBPF_OPEN_CACHE_DEBUG}, 189 {"open_cache", GOSSIP_DBPF_OPEN_CACHE_DEBUG},
diff --git a/fs/orangefs/pvfs2-kernel.h b/fs/orangefs/pvfs2-kernel.h
index 299b48c37cab..29b4a48b3a25 100644
--- a/fs/orangefs/pvfs2-kernel.h
+++ b/fs/orangefs/pvfs2-kernel.h
@@ -229,9 +229,6 @@ int keyword_is_amalgam(char *);
229extern char kernel_debug_string[PVFS2_MAX_DEBUG_STRING_LEN]; 229extern char kernel_debug_string[PVFS2_MAX_DEBUG_STRING_LEN];
230extern char client_debug_string[PVFS2_MAX_DEBUG_STRING_LEN]; 230extern char client_debug_string[PVFS2_MAX_DEBUG_STRING_LEN];
231extern char client_debug_array_string[PVFS2_MAX_DEBUG_STRING_LEN]; 231extern char client_debug_array_string[PVFS2_MAX_DEBUG_STRING_LEN];
232/* HELLO
233extern struct client_debug_mask current_client_mask;
234*/
235extern unsigned int kernel_mask_set_mod_init; 232extern unsigned int kernel_mask_set_mod_init;
236 233
237extern int pvfs2_init_acl(struct inode *inode, struct inode *dir); 234extern int pvfs2_init_acl(struct inode *inode, struct inode *dir);
@@ -431,9 +428,9 @@ struct pvfs2_stats {
431extern struct pvfs2_stats g_pvfs2_stats; 428extern struct pvfs2_stats g_pvfs2_stats;
432 429
433/* 430/*
434 NOTE: See Documentation/filesystems/porting for information 431 * NOTE: See Documentation/filesystems/porting for information
435 on implementing FOO_I and properly accessing fs private data 432 * on implementing FOO_I and properly accessing fs private data
436*/ 433 */
437static inline struct pvfs2_inode_s *PVFS2_I(struct inode *inode) 434static inline struct pvfs2_inode_s *PVFS2_I(struct inode *inode)
438{ 435{
439 return container_of(inode, struct pvfs2_inode_s, vfs_inode); 436 return container_of(inode, struct pvfs2_inode_s, vfs_inode);
diff --git a/fs/orangefs/pvfs2-mod.c b/fs/orangefs/pvfs2-mod.c
index d80537dadcd8..d848c90413d1 100644
--- a/fs/orangefs/pvfs2-mod.c
+++ b/fs/orangefs/pvfs2-mod.c
@@ -73,11 +73,11 @@ module_param(slot_timeout_secs, int, 0);
73struct mutex devreq_mutex; 73struct mutex devreq_mutex;
74 74
75/* 75/*
76 blocks non-priority requests from being queued for servicing. this 76 * Blocks non-priority requests from being queued for servicing. This
77 could be used for protecting the request list data structure, but 77 * could be used for protecting the request list data structure, but
78 for now it's only being used to stall the op addition to the request 78 * for now it's only being used to stall the op addition to the request
79 list 79 * list
80*/ 80 */
81struct mutex request_mutex; 81struct mutex request_mutex;
82 82
83/* hash table for storing operations waiting for matching downcall */ 83/* hash table for storing operations waiting for matching downcall */
diff --git a/fs/orangefs/pvfs2-utils.c b/fs/orangefs/pvfs2-utils.c
index 086ebbb36570..c33e7193599c 100644
--- a/fs/orangefs/pvfs2-utils.c
+++ b/fs/orangefs/pvfs2-utils.c
@@ -111,18 +111,18 @@ static int copy_attributes_to_inode(struct inode *inode,
111 111
112 112
113 /* 113 /*
114 arbitrarily set the inode block size; FIXME: we need to 114 * arbitrarily set the inode block size; FIXME: we need to
115 resolve the difference between the reported inode blocksize 115 * resolve the difference between the reported inode blocksize
116 and the PAGE_CACHE_SIZE, since our block count will always 116 * and the PAGE_CACHE_SIZE, since our block count will always
117 be wrong. 117 * be wrong.
118 118 *
119 For now, we're setting the block count to be the proper 119 * For now, we're setting the block count to be the proper
120 number assuming the block size is 512 bytes, and the size is 120 * number assuming the block size is 512 bytes, and the size is
121 rounded up to the nearest 4K. This is apparently required 121 * rounded up to the nearest 4K. This is apparently required
122 to get proper size reports from the 'du' shell utility. 122 * to get proper size reports from the 'du' shell utility.
123 123 *
124 changing the inode->i_blkbits to something other than 124 * changing the inode->i_blkbits to something other than
125 PAGE_CACHE_SHIFT breaks mmap/execution as we depend on that. 125 * PAGE_CACHE_SHIFT breaks mmap/execution as we depend on that.
126 */ 126 */
127 gossip_debug(GOSSIP_UTILS_DEBUG, 127 gossip_debug(GOSSIP_UTILS_DEBUG,
128 "attrs->mask = %x (objtype = %s)\n", 128 "attrs->mask = %x (objtype = %s)\n",
@@ -662,41 +662,51 @@ __u64 pvfs2_convert_time_field(void *time_ptr)
662 return pvfs2_time; 662 return pvfs2_time;
663} 663}
664 664
665/* The following is a very dirty hack that is now a permanent part of the 665/*
666 * PVFS2 protocol. See protocol.h for more error definitions. */ 666 * The following is a very dirty hack that is now a permanent part of the
667 * PVFS2 protocol. See protocol.h for more error definitions.
668 */
667 669
668/* The order matches include/pvfs2-types.h in the OrangeFS source. */ 670/* The order matches include/pvfs2-types.h in the OrangeFS source. */
669static int PINT_errno_mapping[] = { 671static int PINT_errno_mapping[] = {
670 0, EPERM, ENOENT, EINTR, EIO, ENXIO, EBADF, EAGAIN, ENOMEM, 672 0, EPERM, ENOENT, EINTR, EIO, ENXIO, EBADF, EAGAIN, ENOMEM,
671 EFAULT, EBUSY, EEXIST, ENODEV, ENOTDIR, EISDIR, EINVAL, EMFILE, 673 EFAULT, EBUSY, EEXIST, ENODEV, ENOTDIR, EISDIR, EINVAL, EMFILE,
672 EFBIG, ENOSPC, EROFS, EMLINK, EPIPE, EDEADLK, ENAMETOOLONG, 674 EFBIG, ENOSPC, EROFS, EMLINK, EPIPE, EDEADLK, ENAMETOOLONG,
673 ENOLCK, ENOSYS, ENOTEMPTY, ELOOP, EWOULDBLOCK, ENOMSG, EUNATCH, 675 ENOLCK, ENOSYS, ENOTEMPTY, ELOOP, EWOULDBLOCK, ENOMSG, EUNATCH,
674 EBADR, EDEADLOCK, ENODATA, ETIME, ENONET, EREMOTE, ECOMM, 676 EBADR, EDEADLOCK, ENODATA, ETIME, ENONET, EREMOTE, ECOMM,
675 EPROTO, EBADMSG, EOVERFLOW, ERESTART, EMSGSIZE, EPROTOTYPE, 677 EPROTO, EBADMSG, EOVERFLOW, ERESTART, EMSGSIZE, EPROTOTYPE,
676 ENOPROTOOPT, EPROTONOSUPPORT, EOPNOTSUPP, EADDRINUSE, 678 ENOPROTOOPT, EPROTONOSUPPORT, EOPNOTSUPP, EADDRINUSE,
677 EADDRNOTAVAIL, ENETDOWN, ENETUNREACH, ENETRESET, ENOBUFS, 679 EADDRNOTAVAIL, ENETDOWN, ENETUNREACH, ENETRESET, ENOBUFS,
678 ETIMEDOUT, ECONNREFUSED, EHOSTDOWN, EHOSTUNREACH, EALREADY, 680 ETIMEDOUT, ECONNREFUSED, EHOSTDOWN, EHOSTUNREACH, EALREADY,
679 EACCES, ECONNRESET, ERANGE 681 EACCES, ECONNRESET, ERANGE
680}; 682};
681 683
682int pvfs2_normalize_to_errno(__s32 error_code) 684int pvfs2_normalize_to_errno(__s32 error_code)
683{ 685{
686 __u32 i;
687
684 /* Success */ 688 /* Success */
685 if (error_code == 0) { 689 if (error_code == 0) {
686 return 0; 690 return 0;
687 /* This shouldn't ever happen. If it does it should be fixed on the 691 /*
688 * server. */ 692 * This shouldn't ever happen. If it does it should be fixed on the
693 * server.
694 */
689 } else if (error_code > 0) { 695 } else if (error_code > 0) {
690 gossip_err("pvfs2: error status receieved.\n"); 696 gossip_err("pvfs2: error status receieved.\n");
691 gossip_err("pvfs2: assuming error code is inverted.\n"); 697 gossip_err("pvfs2: assuming error code is inverted.\n");
692 error_code = -error_code; 698 error_code = -error_code;
693 } 699 }
694 700
695 /* XXX: This is very bad since error codes from PVFS2 may not be 701 /*
696 * suitable for return into userspace. */ 702 * XXX: This is very bad since error codes from PVFS2 may not be
703 * suitable for return into userspace.
704 */
697 705
698 /* Convert PVFS2 error values into errno values suitable for return 706 /*
699 * from the kernel. */ 707 * Convert PVFS2 error values into errno values suitable for return
708 * from the kernel.
709 */
700 if ((-error_code) & PVFS_NON_ERRNO_ERROR_BIT) { 710 if ((-error_code) & PVFS_NON_ERRNO_ERROR_BIT) {
701 if (((-error_code) & 711 if (((-error_code) &
702 (PVFS_ERROR_NUMBER_BITS|PVFS_NON_ERRNO_ERROR_BIT| 712 (PVFS_ERROR_NUMBER_BITS|PVFS_NON_ERRNO_ERROR_BIT|
@@ -708,25 +718,24 @@ int pvfs2_normalize_to_errno(__s32 error_code)
708 error_code = -ETIMEDOUT; 718 error_code = -ETIMEDOUT;
709 } else { 719 } else {
710 /* assume a default error code */ 720 /* assume a default error code */
711 gossip_err("pvfs2: warning: got error code without " 721 gossip_err("pvfs2: warning: got error code without errno equivalent: %d.\n", error_code);
712 "errno equivalent: %d.\n", error_code);
713 error_code = -EINVAL; 722 error_code = -EINVAL;
714 } 723 }
715 724
716 /* Convert PVFS2 encoded errno values into regular errno values. */ 725 /* Convert PVFS2 encoded errno values into regular errno values. */
717 } else if ((-error_code) & PVFS_ERROR_BIT) { 726 } else if ((-error_code) & PVFS_ERROR_BIT) {
718 __u32 i;
719 i = (-error_code) & ~(PVFS_ERROR_BIT|PVFS_ERROR_CLASS_BITS); 727 i = (-error_code) & ~(PVFS_ERROR_BIT|PVFS_ERROR_CLASS_BITS);
720 if (i < sizeof PINT_errno_mapping/sizeof *PINT_errno_mapping) 728 if (i < sizeof(PINT_errno_mapping)/sizeof(*PINT_errno_mapping))
721 error_code = -PINT_errno_mapping[i]; 729 error_code = -PINT_errno_mapping[i];
722 else 730 else
723 error_code = -EINVAL; 731 error_code = -EINVAL;
724 732
725 /* Only PVFS2 protocol error codes should ever come here. Otherwise 733 /*
726 * there is a bug somewhere. */ 734 * Only PVFS2 protocol error codes should ever come here. Otherwise
735 * there is a bug somewhere.
736 */
727 } else { 737 } else {
728 gossip_err("pvfs2: pvfs2_normalize_to_errno: got error code" 738 gossip_err("pvfs2: pvfs2_normalize_to_errno: got error code which is not from PVFS2.\n");
729 "which is not from PVFS2.\n");
730 } 739 }
731 return error_code; 740 return error_code;
732} 741}
@@ -993,7 +1002,7 @@ void do_k_string(void *k_mask, int index)
993 __u64 *mask = (__u64 *) k_mask; 1002 __u64 *mask = (__u64 *) k_mask;
994 1003
995 if (keyword_is_amalgam((char *) s_kmod_keyword_mask_map[index].keyword)) 1004 if (keyword_is_amalgam((char *) s_kmod_keyword_mask_map[index].keyword))
996 goto out; 1005 goto out;
997 1006
998 if (*mask & s_kmod_keyword_mask_map[index].mask_val) { 1007 if (*mask & s_kmod_keyword_mask_map[index].mask_val) {
999 if ((strlen(kernel_debug_string) + 1008 if ((strlen(kernel_debug_string) +