gossip_err("%s: Failed to copy-in buffers. Please make sure that the pvfs2-client is running. %ld\n",
__func__,
(long)ret);
-
}
if (ret < 0)
if (ret < 0) {
handle_io_error(); /* defined in pvfs2-kernel.h */
/*
- don't write an error to syslog on signaled operation
- termination unless we've got debugging turned on, as
- this can happen regularly (i.e. ctrl-c)
+ * don't write an error to syslog on signaled operation
+ * termination unless we've got debugging turned on, as
+ * this can happen regularly (i.e. ctrl-c)
*/
if (ret == -EINTR)
gossip_debug(GOSSIP_FILE_DEBUG,
ret = new_op->downcall.resp.io.amt_complete;
/*
- tell the device file owner waiting on I/O that this read has
- completed and it can return now. in this exact case, on
- wakeup the daemon will free the op, so we *cannot* touch it
- after this.
+ * tell the device file owner waiting on I/O that this read has
+ * completed and it can return now. in this exact case, on
+ * wakeup the daemon will free the op, so we *cannot* touch it
+ * after this.
*/
wake_up_daemon_for_return(new_op);
new_op = NULL;
pvfs2_flush_inode(inode);
/*
- remove all associated inode pages from the page cache and mmap
- readahead cache (if any); this forces an expensive refresh of
- data for the next caller of mmap (or 'get_block' accesses)
+ * remove all associated inode pages from the page cache and mmap
+ * readahead cache (if any); this forces an expensive refresh of
+ * data for the next caller of mmap (or 'get_block' accesses)
*/
if (file->f_path.dentry->d_inode &&
file->f_path.dentry->d_inode->i_mapping &&
}
gossip_debug(GOSSIP_FILE_DEBUG,
- "pvfs2_file_llseek: offset is %ld | origin is %d | "
- "inode size is %lu\n",
+ "pvfs2_file_llseek: offset is %ld | origin is %d"
+ " | inode size is %lu\n",
(long)offset,
origin,
(unsigned long)file->f_path.dentry->d_inode->i_size);
#define PVFS2_SUPER_MAGIC 0x20030528
-/* PVFS2 error codes are a signed 32-bit integer. Error codes are negative, but
- * the sign is stripped before decoding. */
+/*
+ * PVFS2 error codes are a signed 32-bit integer. Error codes are negative, but
+ * the sign is stripped before decoding.
+ */
/* Bit 31 is not used since it is the sign. */
-/* Bit 30 specifies that this is a PVFS2 error. A PVFS2 error is either an
- * encoded errno value or a PVFS2 protocol error. */
+/*
+ * Bit 30 specifies that this is a PVFS2 error. A PVFS2 error is either an
+ * encoded errno value or a PVFS2 protocol error.
+ */
#define PVFS_ERROR_BIT (1 << 30)
-/* Bit 29 specifies that this is a PVFS2 protocol error and not an encoded
- * errno value. */
+/*
+ * Bit 29 specifies that this is a PVFS2 protocol error and not an encoded
+ * errno value.
+ */
#define PVFS_NON_ERRNO_ERROR_BIT (1 << 29)
-/* Bits 9, 8, and 7 specify the error class, which encodes the section of
+/*
+ * Bits 9, 8, and 7 specify the error class, which encodes the section of
* server code the error originated in for logging purposes. It is not used
- * in the kernel except to be masked out. */
+ * in the kernel except to be masked out.
+ */
#define PVFS_ERROR_CLASS_BITS 0x380
/* Bits 6 - 0 are reserved for the actual error code. */
/*
* version number for use in communicating between kernel space and user
- * space
+ * space. Zero signifies the upstream version of the kernel module.
*/
-/*
-#define PVFS_KERNEL_PROTO_VERSION \
- ((PVFS2_VERSION_MAJOR * 10000) + \
- (PVFS2_VERSION_MINOR * 100) + \
- PVFS2_VERSION_SUB)
-*/
#define PVFS_KERNEL_PROTO_VERSION 0
/*
/*
- arbitrarily set the inode block size; FIXME: we need to
- resolve the difference between the reported inode blocksize
- and the PAGE_CACHE_SIZE, since our block count will always
- be wrong.
-
- For now, we're setting the block count to be the proper
- number assuming the block size is 512 bytes, and the size is
- rounded up to the nearest 4K. This is apparently required
- to get proper size reports from the 'du' shell utility.
-
- changing the inode->i_blkbits to something other than
- PAGE_CACHE_SHIFT breaks mmap/execution as we depend on that.
+ * arbitrarily set the inode block size; FIXME: we need to
+ * resolve the difference between the reported inode blocksize
+ * and the PAGE_CACHE_SIZE, since our block count will always
+ * be wrong.
+ *
+ * For now, we're setting the block count to be the proper
+ * number assuming the block size is 512 bytes, and the size is
+ * rounded up to the nearest 4K. This is apparently required
+ * to get proper size reports from the 'du' shell utility.
+ *
+ * changing the inode->i_blkbits to something other than
+ * PAGE_CACHE_SHIFT breaks mmap/execution as we depend on that.
*/
gossip_debug(GOSSIP_UTILS_DEBUG,
"attrs->mask = %x (objtype = %s)\n",
return pvfs2_time;
}
-/* The following is a very dirty hack that is now a permanent part of the
- * PVFS2 protocol. See protocol.h for more error definitions. */
+/*
+ * The following is a very dirty hack that is now a permanent part of the
+ * PVFS2 protocol. See protocol.h for more error definitions.
+ */
/* The order matches include/pvfs2-types.h in the OrangeFS source. */
static int PINT_errno_mapping[] = {
- 0, EPERM, ENOENT, EINTR, EIO, ENXIO, EBADF, EAGAIN, ENOMEM,
- EFAULT, EBUSY, EEXIST, ENODEV, ENOTDIR, EISDIR, EINVAL, EMFILE,
- EFBIG, ENOSPC, EROFS, EMLINK, EPIPE, EDEADLK, ENAMETOOLONG,
- ENOLCK, ENOSYS, ENOTEMPTY, ELOOP, EWOULDBLOCK, ENOMSG, EUNATCH,
- EBADR, EDEADLOCK, ENODATA, ETIME, ENONET, EREMOTE, ECOMM,
- EPROTO, EBADMSG, EOVERFLOW, ERESTART, EMSGSIZE, EPROTOTYPE,
- ENOPROTOOPT, EPROTONOSUPPORT, EOPNOTSUPP, EADDRINUSE,
- EADDRNOTAVAIL, ENETDOWN, ENETUNREACH, ENETRESET, ENOBUFS,
- ETIMEDOUT, ECONNREFUSED, EHOSTDOWN, EHOSTUNREACH, EALREADY,
- EACCES, ECONNRESET, ERANGE
+ 0, EPERM, ENOENT, EINTR, EIO, ENXIO, EBADF, EAGAIN, ENOMEM,
+ EFAULT, EBUSY, EEXIST, ENODEV, ENOTDIR, EISDIR, EINVAL, EMFILE,
+ EFBIG, ENOSPC, EROFS, EMLINK, EPIPE, EDEADLK, ENAMETOOLONG,
+ ENOLCK, ENOSYS, ENOTEMPTY, ELOOP, EWOULDBLOCK, ENOMSG, EUNATCH,
+ EBADR, EDEADLOCK, ENODATA, ETIME, ENONET, EREMOTE, ECOMM,
+ EPROTO, EBADMSG, EOVERFLOW, ERESTART, EMSGSIZE, EPROTOTYPE,
+ ENOPROTOOPT, EPROTONOSUPPORT, EOPNOTSUPP, EADDRINUSE,
+ EADDRNOTAVAIL, ENETDOWN, ENETUNREACH, ENETRESET, ENOBUFS,
+ ETIMEDOUT, ECONNREFUSED, EHOSTDOWN, EHOSTUNREACH, EALREADY,
+ EACCES, ECONNRESET, ERANGE
};
int pvfs2_normalize_to_errno(__s32 error_code)
{
+ __u32 i;
+
/* Success */
if (error_code == 0) {
return 0;
- /* This shouldn't ever happen. If it does it should be fixed on the
- * server. */
+ /*
+ * This shouldn't ever happen. If it does it should be fixed on the
+ * server.
+ */
} else if (error_code > 0) {
gossip_err("pvfs2: error status receieved.\n");
gossip_err("pvfs2: assuming error code is inverted.\n");
error_code = -error_code;
}
- /* XXX: This is very bad since error codes from PVFS2 may not be
- * suitable for return into userspace. */
+ /*
+ * XXX: This is very bad since error codes from PVFS2 may not be
+ * suitable for return into userspace.
+ */
- /* Convert PVFS2 error values into errno values suitable for return
- * from the kernel. */
+ /*
+ * Convert PVFS2 error values into errno values suitable for return
+ * from the kernel.
+ */
if ((-error_code) & PVFS_NON_ERRNO_ERROR_BIT) {
if (((-error_code) &
(PVFS_ERROR_NUMBER_BITS|PVFS_NON_ERRNO_ERROR_BIT|
error_code = -ETIMEDOUT;
} else {
/* assume a default error code */
- gossip_err("pvfs2: warning: got error code without "
- "errno equivalent: %d.\n", error_code);
+ gossip_err("pvfs2: warning: got error code without errno equivalent: %d.\n", error_code);
error_code = -EINVAL;
}
/* Convert PVFS2 encoded errno values into regular errno values. */
} else if ((-error_code) & PVFS_ERROR_BIT) {
- __u32 i;
i = (-error_code) & ~(PVFS_ERROR_BIT|PVFS_ERROR_CLASS_BITS);
- if (i < sizeof PINT_errno_mapping/sizeof *PINT_errno_mapping)
+ if (i < sizeof(PINT_errno_mapping)/sizeof(*PINT_errno_mapping))
error_code = -PINT_errno_mapping[i];
else
error_code = -EINVAL;
- /* Only PVFS2 protocol error codes should ever come here. Otherwise
- * there is a bug somewhere. */
+ /*
+ * Only PVFS2 protocol error codes should ever come here. Otherwise
+ * there is a bug somewhere.
+ */
} else {
- gossip_err("pvfs2: pvfs2_normalize_to_errno: got error code"
- "which is not from PVFS2.\n");
+ gossip_err("pvfs2: pvfs2_normalize_to_errno: got error code which is not from PVFS2.\n");
}
return error_code;
}
__u64 *mask = (__u64 *) k_mask;
if (keyword_is_amalgam((char *) s_kmod_keyword_mask_map[index].keyword))
- goto out;
+ goto out;
if (*mask & s_kmod_keyword_mask_map[index].mask_val) {
if ((strlen(kernel_debug_string) +