* [PATCH V3 8/7] Orangefs: kernel client update 1.
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
@ 2015-07-24 19:09 ` Mike Marshall
2015-07-28 20:27 ` [PATCH V3 9/7] Orangefs: sooth most sparse complaints hubcap
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Mike Marshall @ 2015-07-24 19:09 UTC (permalink / raw)
To: viro; +Cc: Mike Marshall, linux-fsdevel
From: Mike Marshall <hubcap@omnibond.com>
Stephen Rothwell noticed that orangefs would not compile
on powerpc...
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
fs/orangefs/devpvfs2-req.c | 17 ++++++++++++-----
fs/orangefs/protocol.h | 1 +
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/fs/orangefs/devpvfs2-req.c b/fs/orangefs/devpvfs2-req.c
index 3e45022..7e60fd0 100644
--- a/fs/orangefs/devpvfs2-req.c
+++ b/fs/orangefs/devpvfs2-req.c
@@ -36,7 +36,7 @@ do { \
static int hash_func(__u64 tag, int table_size)
{
- return tag % ((unsigned int)table_size);
+ return do_div(tag, (unsigned int)table_size);
}
static void pvfs2_devreq_add_op(struct pvfs2_kernel_op_s *op)
@@ -279,7 +279,7 @@ static ssize_t pvfs2_devreq_writev(struct file *file,
/* Either there is a trailer or there isn't */
if (count != notrailer_count && count != (notrailer_count + 1)) {
- gossip_err("Error: Number of iov vectors is (%ld) and notrailer count is %d\n",
+ gossip_err("Error: Number of iov vectors is (%zu) and notrailer count is %d\n",
count,
notrailer_count);
return -EPROTO;
@@ -356,7 +356,7 @@ static ssize_t pvfs2_devreq_writev(struct file *file,
"writev: trailer size %ld\n",
(unsigned long)op->downcall.trailer_size);
if (count != (notrailer_count + 1)) {
- gossip_err("Error: trailer size (%ld) is non-zero, no trailer elements though? (%ld)\n", (unsigned long)op->downcall.trailer_size, count);
+ gossip_err("Error: trailer size (%ld) is non-zero, no trailer elements though? (%zu)\n", (unsigned long)op->downcall.trailer_size, count);
dev_req_release(buffer);
put_op(op);
return -EPROTO;
@@ -908,6 +908,14 @@ static long pvfs2_devreq_compat_ioctl(struct file *filp, unsigned int cmd,
return dispatch_ioctl_command(cmd, arg);
}
+#endif /* CONFIG_COMPAT is in .config */
+
+/*
+ * The following two ioctl32 functions had been refactored into the above
+ * CONFIG_COMPAT ifdef, but that was an over simplification that was
+ * not noticed until we tried to compile on power pc...
+ */
+#if (defined(CONFIG_COMPAT) && !defined(HAVE_REGISTER_IOCTL32_CONVERSION)) || !defined(CONFIG_COMPAT)
static int pvfs2_ioctl32_init(void)
{
return 0;
@@ -917,8 +925,7 @@ static void pvfs2_ioctl32_cleanup(void)
{
return;
}
-
-#endif /* CONFIG_COMPAT is in .config */
+#endif
/* the assigned character device major number */
static int pvfs2_dev_major;
diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h
index 2fb3a63..8e0c8a6 100644
--- a/fs/orangefs/protocol.h
+++ b/fs/orangefs/protocol.h
@@ -1,6 +1,7 @@
#include <linux/spinlock_types.h>
#include <linux/types.h>
#include <linux/slab.h>
+#include <linux/ioctl.h>
extern struct client_debug_mask *cdm_array;
extern char *debug_help_string;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V3 9/7] Orangefs: sooth most sparse complaints
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
2015-07-24 19:09 ` [PATCH V3 8/7] Orangefs: kernel client update 1 Mike Marshall
@ 2015-07-28 20:27 ` hubcap
2015-07-29 19:57 ` [PATCH V3 10/7] Orangefs: address problems found by static checker hubcap
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: hubcap @ 2015-07-28 20:27 UTC (permalink / raw)
To: viro; +Cc: Mike Marshall, linux-fsdevel
From: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
fs/orangefs/devpvfs2-req.c | 2 +-
fs/orangefs/file.c | 13 ++++++++-----
fs/orangefs/inode.c | 2 +-
fs/orangefs/protocol.h | 12 +-----------
fs/orangefs/pvfs2-bufmap.c | 10 +++++++---
fs/orangefs/pvfs2-debugfs.c | 2 +-
fs/orangefs/pvfs2-kernel.h | 2 +-
fs/orangefs/pvfs2-mod.c | 1 -
fs/orangefs/pvfs2-sysfs.c | 4 ++--
fs/orangefs/super.c | 8 ++++----
fs/orangefs/waitqueue.c | 7 +++++++
11 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/fs/orangefs/devpvfs2-req.c b/fs/orangefs/devpvfs2-req.c
index 7e60fd0..13878ca 100644
--- a/fs/orangefs/devpvfs2-req.c
+++ b/fs/orangefs/devpvfs2-req.c
@@ -857,7 +857,7 @@ static unsigned long translate_dev_map26(unsigned long args, long *error)
*/
struct PVFS_dev_map_desc __user *p =
compat_alloc_user_space(sizeof(*p));
- u32 addr;
+ compat_uptr_t addr;
*error = 0;
/* get the ptr from the 32 bit user-space */
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 8e26f9f..4ba1b6c 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -799,7 +799,7 @@ out:
/*
* Perform a miscellaneous operation on a file.
*/
-long pvfs2_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+static long pvfs2_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
int ret = -ENOTTY;
__u64 val = 0;
@@ -885,7 +885,7 @@ static int pvfs2_file_mmap(struct file *file, struct vm_area_struct *vma)
*
* \note Not called when each file is closed.
*/
-int pvfs2_file_release(struct inode *inode, struct file *file)
+static int pvfs2_file_release(struct inode *inode, struct file *file)
{
gossip_debug(GOSSIP_FILE_DEBUG,
"pvfs2_file_release: called on %s\n",
@@ -909,7 +909,10 @@ int pvfs2_file_release(struct inode *inode, struct file *file)
/*
* Push all data for a specific file onto permanent storage.
*/
-int pvfs2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
+static int pvfs2_fsync(struct file *file,
+ loff_t start,
+ loff_t end,
+ int datasync)
{
int ret = -EINVAL;
struct pvfs2_inode_s *pvfs2_inode =
@@ -947,7 +950,7 @@ int pvfs2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
* Future upgrade could support SEEK_DATA and SEEK_HOLE but would
* require much changes to the FS
*/
-loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
+static loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
{
int ret = -EINVAL;
struct inode *inode = file->f_path.dentry->d_inode;
@@ -989,7 +992,7 @@ loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
* Support local locks (locks that only this kernel knows about)
* if Orangefs was mounted -o local_lock.
*/
-int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
+static int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
{
int rc = -ENOLCK;
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index feda00f..9ff6b29 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -33,7 +33,7 @@ static int read_one_page(struct page *page)
loff_t blockptr_offset = (((loff_t) page->index) << blockbits);
bytes_read = pvfs2_inode_read(inode,
- page_data,
+ (char __user *) page_data,
blocksize,
&blockptr_offset,
inode->i_size);
diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h
index 8e0c8a6..ca7cef9 100644
--- a/fs/orangefs/protocol.h
+++ b/fs/orangefs/protocol.h
@@ -341,7 +341,7 @@ __s32 PINT_non_errno_mapping[] = { \
extern __s32 PINT_errno_mapping[]; \
extern __s32 PINT_non_errno_mapping[]; \
extern const char *PINT_non_errno_strerror_mapping[]; \
-__s32 PVFS_get_errno_mapping(__s32 error) \
+static __s32 PVFS_get_errno_mapping(__s32 error) \
{ \
__s32 ret = error, mask = 0; \
__s32 positive = ((error > -1) ? 1 : 0); \
@@ -364,16 +364,6 @@ __s32 PVFS_get_errno_mapping(__s32 error) \
} \
return ret; \
} \
-__s32 PVFS_errno_to_error(int err) \
-{ \
- __s32 e = 0; \
- \
- for (; e < PVFS_ERRNO_MAX; ++e) \
- if (PINT_errno_mapping[e] == err) \
- return e | PVFS_ERROR_BIT; \
- \
- return err; \
-} \
DECLARE_ERRNO_MAPPING()
/* permission bits */
diff --git a/fs/orangefs/pvfs2-bufmap.c b/fs/orangefs/pvfs2-bufmap.c
index aa14c37..a439163 100644
--- a/fs/orangefs/pvfs2-bufmap.c
+++ b/fs/orangefs/pvfs2-bufmap.c
@@ -9,7 +9,7 @@
DECLARE_WAIT_QUEUE_HEAD(pvfs2_bufmap_init_waitq);
-struct pvfs2_bufmap {
+static struct pvfs2_bufmap {
atomic_t refcnt;
int desc_size;
@@ -663,6 +663,7 @@ int pvfs_bufmap_copy_iovec_from_kernel(struct pvfs2_bufmap *bufmap,
int to_page_index = 0;
void *to_kaddr = NULL;
void *from_kaddr = NULL;
+ struct kvec *iv = NULL;
struct iovec *copied_iovec = NULL;
struct pvfs_bufmap_desc *to;
unsigned int seg;
@@ -708,9 +709,10 @@ int pvfs_bufmap_copy_iovec_from_kernel(struct pvfs2_bufmap *bufmap,
* buffer into the mapped buffer one page at a time though
*/
while (amt_copied < size) {
- struct iovec *iv = &copied_iovec[seg];
int inc_to_page_index;
+ iv = (struct kvec *) &copied_iovec[seg];
+
if (iv->iov_len < (PAGE_SIZE - to_page_offset)) {
cur_copy_size =
PVFS_util_min(iv->iov_len, size - amt_copied);
@@ -885,6 +887,7 @@ int pvfs_bufmap_copy_to_kernel_iovec(struct pvfs2_bufmap *bufmap,
int from_page_index = 0;
void *from_kaddr = NULL;
void *to_kaddr = NULL;
+ struct kvec *iv;
struct iovec *copied_iovec = NULL;
struct pvfs_bufmap_desc *from;
unsigned int seg;
@@ -930,9 +933,10 @@ int pvfs_bufmap_copy_to_kernel_iovec(struct pvfs2_bufmap *bufmap,
* but make sure that we do so one page at a time.
*/
while (amt_copied < size) {
- struct iovec *iv = &copied_iovec[seg];
int inc_from_page_index;
+ iv = (struct kvec *) &copied_iovec[seg];
+
if (iv->iov_len < (PAGE_SIZE - from_page_offset)) {
cur_copy_size =
PVFS_util_min(iv->iov_len, size - amt_copied);
diff --git a/fs/orangefs/pvfs2-debugfs.c b/fs/orangefs/pvfs2-debugfs.c
index 8d118da..ba5bfef 100644
--- a/fs/orangefs/pvfs2-debugfs.c
+++ b/fs/orangefs/pvfs2-debugfs.c
@@ -70,7 +70,7 @@ static const struct seq_operations help_debug_ops = {
* Used to protect data in ORANGEFS_KMOD_DEBUG_FILE and
* ORANGEFS_KMOD_DEBUG_FILE.
*/
-DEFINE_MUTEX(orangefs_debug_lock);
+static DEFINE_MUTEX(orangefs_debug_lock);
int orangefs_debug_open(struct inode *, struct file *);
diff --git a/fs/orangefs/pvfs2-kernel.h b/fs/orangefs/pvfs2-kernel.h
index 6c787c4..be30111 100644
--- a/fs/orangefs/pvfs2-kernel.h
+++ b/fs/orangefs/pvfs2-kernel.h
@@ -608,7 +608,7 @@ struct inode *pvfs2_iget(struct super_block *sb,
struct pvfs2_object_kref *ref);
ssize_t pvfs2_inode_read(struct inode *inode,
- char *buf,
+ char __user *buf,
size_t count,
loff_t *offset,
loff_t readahead_size);
diff --git a/fs/orangefs/pvfs2-mod.c b/fs/orangefs/pvfs2-mod.c
index 9cbc992..69289c5 100644
--- a/fs/orangefs/pvfs2-mod.c
+++ b/fs/orangefs/pvfs2-mod.c
@@ -47,7 +47,6 @@ struct client_debug_mask client_debug_mask = { NULL, 0, 0 };
unsigned int kernel_mask_set_mod_init; /* implicitly false */
int op_timeout_secs = PVFS2_DEFAULT_OP_TIMEOUT_SECS;
int slot_timeout_secs = PVFS2_DEFAULT_SLOT_TIMEOUT_SECS;
-__u32 DEBUG_LINE = 50;
MODULE_LICENSE("GPL");
MODULE_AUTHOR("PVFS2 Development Team");
diff --git a/fs/orangefs/pvfs2-sysfs.c b/fs/orangefs/pvfs2-sysfs.c
index 6d0e18b..ea635b5 100644
--- a/fs/orangefs/pvfs2-sysfs.c
+++ b/fs/orangefs/pvfs2-sysfs.c
@@ -750,7 +750,7 @@ out:
/*
* obtain attribute values from userspace with a service operation.
*/
-int sysfs_service_op_show(char *kobj_id, char *buf, void *attr)
+static int sysfs_service_op_show(char *kobj_id, char *buf, void *attr)
{
struct pvfs2_kernel_op_s *new_op = NULL;
int rc = 0;
@@ -1023,7 +1023,7 @@ static ssize_t
* We want to return 1 if we think everything went OK, and
* EINVAL if not.
*/
-int sysfs_service_op_store(char *kobj_id, const char *buf, void *attr)
+static int sysfs_service_op_store(char *kobj_id, const char *buf, void *attr)
{
struct pvfs2_kernel_op_s *new_op = NULL;
int val = 0;
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index a854390..90c7a1c 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -269,7 +269,7 @@ static void pvfs2_dirty_inode(struct inode *inode, int flags)
SetAtimeFlag(pvfs2_inode);
}
-struct super_operations pvfs2_s_ops = {
+static const struct super_operations pvfs2_s_ops = {
.alloc_inode = pvfs2_alloc_inode,
.destroy_inode = pvfs2_destroy_inode,
.dirty_inode = pvfs2_dirty_inode,
@@ -279,7 +279,7 @@ struct super_operations pvfs2_s_ops = {
.show_options = generic_show_options,
};
-struct dentry *pvfs2_fh_to_dentry(struct super_block *sb,
+static struct dentry *pvfs2_fh_to_dentry(struct super_block *sb,
struct fid *fid,
int fh_len,
int fh_type)
@@ -299,7 +299,7 @@ struct dentry *pvfs2_fh_to_dentry(struct super_block *sb,
return d_obtain_alias(pvfs2_iget(sb, &refn));
}
-int pvfs2_encode_fh(struct inode *inode,
+static int pvfs2_encode_fh(struct inode *inode,
__u32 *fh,
int *max_len,
struct inode *parent)
@@ -347,7 +347,7 @@ static struct export_operations pvfs2_export_ops = {
.fh_to_dentry = pvfs2_fh_to_dentry,
};
-int pvfs2_fill_sb(struct super_block *sb, void *data, int silent)
+static int pvfs2_fill_sb(struct super_block *sb, void *data, int silent)
{
int ret = -EINVAL;
struct inode *root = NULL;
diff --git a/fs/orangefs/waitqueue.c b/fs/orangefs/waitqueue.c
index 9b32286..ad79e53 100644
--- a/fs/orangefs/waitqueue.c
+++ b/fs/orangefs/waitqueue.c
@@ -314,6 +314,13 @@ void pvfs2_clean_up_interrupted_operation(struct pvfs2_kernel_op_s *op)
spin_unlock(&op->lock);
gossip_err("interrupted operation is in a weird state 0x%x\n",
op->op_state);
+ } else {
+ /*
+ * It is not intended for execution to flow here,
+ * but having this unlock here makes sparse happy.
+ */
+ gossip_err("%s: can't get here.\n", __func__);
+ spin_unlock(&op->lock);
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V3 10/7] Orangefs: address problems found by static checker
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
2015-07-24 19:09 ` [PATCH V3 8/7] Orangefs: kernel client update 1 Mike Marshall
2015-07-28 20:27 ` [PATCH V3 9/7] Orangefs: sooth most sparse complaints hubcap
@ 2015-07-29 19:57 ` hubcap
2015-07-30 20:33 ` [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type hubcap
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: hubcap @ 2015-07-29 19:57 UTC (permalink / raw)
To: viro; +Cc: Mike Marshall, linux-fsdevel
From: Mike Marshall <hubcap@omnibond.com>
Don't check for negative rc from boolean.
Don't pointlessly initialize variables, it short-circuits
gcc's uninitialized variable warnings. And max_new_nr_segs
can never be zero, so don't check for it.
Preserve original kstrdup pointer for freeing later.
Don't check for negative value in unsigned variable.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
fs/orangefs/dir.c | 16 ----------------
fs/orangefs/file.c | 18 ++++++------------
fs/orangefs/pvfs2-utils.c | 4 +++-
fs/orangefs/xattr.c | 6 ++----
4 files changed, 11 insertions(+), 33 deletions(-)
diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c
index 9b5f4bb..c126c0f 100644
--- a/fs/orangefs/dir.c
+++ b/fs/orangefs/dir.c
@@ -104,7 +104,6 @@ static void readdir_handle_dtor(struct pvfs2_bufmap *bufmap,
*
* \param dir_emit callback function called for each entry read.
*
- * \retval <0 on error
* \retval 0 when directory has been completely traversed
* \retval >0 if we don't call dir_emit for all entries
*
@@ -253,8 +252,6 @@ get_new_buffer_index:
__func__,
llu(pos));
ret = dir_emit(ctx, ".", 1, ino, DT_DIR);
- if (ret < 0)
- goto out_destroy_handle;
ctx->pos++;
gossip_ldebug(GOSSIP_DIR_DEBUG,
"%s: ctx->pos:%lld\n",
@@ -270,8 +267,6 @@ get_new_buffer_index:
__func__,
llu(pos));
ret = dir_emit(ctx, "..", 2, ino, DT_DIR);
- if (ret < 0)
- goto out_destroy_handle;
ctx->pos++;
gossip_ldebug(GOSSIP_DIR_DEBUG,
"%s: ctx->pos:%lld\n",
@@ -293,17 +288,6 @@ get_new_buffer_index:
(unsigned long)pos);
ret =
dir_emit(ctx, current_entry, len, current_ino, DT_UNKNOWN);
- if (ret < 0) {
- gossip_debug(GOSSIP_DIR_DEBUG,
- "dir_emit() failed. ret:%d\n",
- ret);
- if (i < 2) {
- gossip_err("dir_emit failed on one of the first two true PVFS directory entries.\n");
- gossip_err("Duplicate entries may appear.\n");
- }
- buffer_full = 1;
- break;
- }
ctx->pos++;
gossip_ldebug(GOSSIP_DIR_DEBUG,
"%s: ctx->pos:%lld\n",
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 4ba1b6c..013a07c 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -463,12 +463,12 @@ static ssize_t do_readv_writev(enum PVFS_io_type type, struct file *file,
unsigned int to_free;
size_t count;
unsigned long seg;
- unsigned long new_nr_segs = 0;
- unsigned long max_new_nr_segs = 0;
- unsigned long seg_count = 0;
- unsigned long *seg_array = NULL;
- struct iovec *iovecptr = NULL;
- struct iovec *ptr = NULL;
+ unsigned long new_nr_segs;
+ unsigned long max_new_nr_segs;
+ unsigned long seg_count;
+ unsigned long *seg_array;
+ struct iovec *iovecptr;
+ struct iovec *ptr;
total_count = 0;
ret = -EINVAL;
@@ -477,12 +477,6 @@ static ssize_t do_readv_writev(enum PVFS_io_type type, struct file *file,
/* Compute total and max number of segments after split */
max_new_nr_segs = bound_max_iovecs(iov, nr_segs, &count);
- if (max_new_nr_segs < 0) {
- gossip_lerr("%s: could not bound iovec %lu\n",
- __func__,
- max_new_nr_segs);
- goto out;
- }
gossip_debug(GOSSIP_FILE_DEBUG,
"%s-BEGIN(%pU): count(%d) after estimate_max_iovecs.\n",
diff --git a/fs/orangefs/pvfs2-utils.c b/fs/orangefs/pvfs2-utils.c
index 107f425..8d4411c 100644
--- a/fs/orangefs/pvfs2-utils.c
+++ b/fs/orangefs/pvfs2-utils.c
@@ -1077,6 +1077,7 @@ void debug_string_to_mask(char *debug_string, void *mask, int type)
char *unchecked_keyword;
int i;
char *strsep_fodder = kstrdup(debug_string, GFP_KERNEL);
+ char *original_pointer;
int element_count = 0;
struct client_debug_mask *c_mask;
__u64 *k_mask;
@@ -1092,6 +1093,7 @@ void debug_string_to_mask(char *debug_string, void *mask, int type)
element_count = num_kmod_keyword_mask_map;
}
+ original_pointer = strsep_fodder;
while ((unchecked_keyword = strsep(&strsep_fodder, ",")))
if (strlen(unchecked_keyword)) {
for (i = 0; i < element_count; i++)
@@ -1105,7 +1107,7 @@ void debug_string_to_mask(char *debug_string, void *mask, int type)
&k_mask);
}
- kfree(strsep_fodder);
+ kfree(original_pointer);
}
void do_c_mask(int i,
diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c
index 2766090..227eaa4 100644
--- a/fs/orangefs/xattr.c
+++ b/fs/orangefs/xattr.c
@@ -77,10 +77,8 @@ ssize_t pvfs2_inode_getxattr(struct inode *inode, const char *prefix,
gossip_err("pvfs2_inode_getxattr: bogus NULL pointers\n");
return -EINVAL;
}
- if (size < 0 ||
- (strlen(name) + strlen(prefix)) >= PVFS_MAX_XATTR_NAMELEN) {
- gossip_err("Invalid size (%d) or key length (%d)\n",
- (int)size,
+ if ((strlen(name) + strlen(prefix)) >= PVFS_MAX_XATTR_NAMELEN) {
+ gossip_err("Invalid key length (%d)\n",
(int)(strlen(name) + strlen(prefix)));
return -EINVAL;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
` (2 preceding siblings ...)
2015-07-29 19:57 ` [PATCH V3 10/7] Orangefs: address problems found by static checker hubcap
@ 2015-07-30 20:33 ` hubcap
2015-07-31 7:36 ` Christoph Hellwig
2015-08-05 19:48 ` [PATCH V3 12/7] Orangefs: use inode_set_bytes for directories hubcap
` (2 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: hubcap @ 2015-07-30 20:33 UTC (permalink / raw)
To: viro; +Cc: Mike Marshall, linux-fsdevel
From: Mike Marshall <hubcap@omnibond.com>
make.cross ARCH=tile doesn't like "inode->i_bytes = PAGE_CACHE_SIZE;",
so cast PAGE_CACHE_SIZE to unsigned short.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
fs/orangefs/pvfs2-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/orangefs/pvfs2-utils.c b/fs/orangefs/pvfs2-utils.c
index 8d4411c..6eecb18 100644
--- a/fs/orangefs/pvfs2-utils.c
+++ b/fs/orangefs/pvfs2-utils.c
@@ -163,7 +163,7 @@ static int copy_attributes_to_inode(struct inode *inode,
/*FALLTHRU*/
default:
pvfs2_lock_inode(inode);
- inode->i_bytes = PAGE_CACHE_SIZE;
+ inode->i_bytes = (unsigned short)PAGE_CACHE_SIZE;
inode->i_blocks = (unsigned long)(PAGE_CACHE_SIZE / 512);
pvfs2_unlock_inode(inode);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type
2015-07-30 20:33 ` [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type hubcap
@ 2015-07-31 7:36 ` Christoph Hellwig
2015-07-31 8:26 ` Al Viro
0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2015-07-31 7:36 UTC (permalink / raw)
To: hubcap; +Cc: viro, linux-fsdevel
On Thu, Jul 30, 2015 at 04:33:01PM -0400, hubcap wrote:
> From: Mike Marshall <hubcap@omnibond.com>
>
> make.cross ARCH=tile doesn't like "inode->i_bytes = PAGE_CACHE_SIZE;",
> so cast PAGE_CACHE_SIZE to unsigned short.
I don't think this is correct. i_bytes is short because it only
contains the low bits of th size, the rest goes into i_blocks.
You probably want to use inode_set_bytes here instead.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type
2015-07-31 7:36 ` Christoph Hellwig
@ 2015-07-31 8:26 ` Al Viro
0 siblings, 0 replies; 10+ messages in thread
From: Al Viro @ 2015-07-31 8:26 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: hubcap, linux-fsdevel
On Fri, Jul 31, 2015 at 12:36:22AM -0700, Christoph Hellwig wrote:
> On Thu, Jul 30, 2015 at 04:33:01PM -0400, hubcap wrote:
> > From: Mike Marshall <hubcap@omnibond.com>
> >
> > make.cross ARCH=tile doesn't like "inode->i_bytes = PAGE_CACHE_SIZE;",
> > so cast PAGE_CACHE_SIZE to unsigned short.
>
> I don't think this is correct. i_bytes is short because it only
> contains the low bits of th size, the rest goes into i_blocks.
>
> You probably want to use inode_set_bytes here instead.
... or just leave ->i_bytes zero, what with PAGE_CACHE_SIZE being a multiple
of 512...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH V3 12/7] Orangefs: use inode_set_bytes for directories
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
` (3 preceding siblings ...)
2015-07-30 20:33 ` [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type hubcap
@ 2015-08-05 19:48 ` hubcap
2015-08-05 19:48 ` [PATCH V2 13/7] fs: orangefs: remove execute priviliges from module params hubcap
2015-08-05 19:48 ` [PATCH V3 14/7] Orangefs: Swap order of include files hubcap
6 siblings, 0 replies; 10+ messages in thread
From: hubcap @ 2015-08-05 19:48 UTC (permalink / raw)
To: viro; +Cc: Mike Marshall, linux-fsdevel
From: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
fs/orangefs/pvfs2-utils.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/orangefs/pvfs2-utils.c b/fs/orangefs/pvfs2-utils.c
index 6eecb18..11ee073 100644
--- a/fs/orangefs/pvfs2-utils.c
+++ b/fs/orangefs/pvfs2-utils.c
@@ -162,12 +162,11 @@ static int copy_attributes_to_inode(struct inode *inode,
}
/*FALLTHRU*/
default:
+ inode->i_size = PAGE_CACHE_SIZE;
+
pvfs2_lock_inode(inode);
- inode->i_bytes = (unsigned short)PAGE_CACHE_SIZE;
- inode->i_blocks = (unsigned long)(PAGE_CACHE_SIZE / 512);
+ inode_set_bytes(inode, inode->i_size);
pvfs2_unlock_inode(inode);
-
- inode->i_size = PAGE_CACHE_SIZE;
break;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V2 13/7] fs: orangefs: remove execute priviliges from module params
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
` (4 preceding siblings ...)
2015-08-05 19:48 ` [PATCH V3 12/7] Orangefs: use inode_set_bytes for directories hubcap
@ 2015-08-05 19:48 ` hubcap
2015-08-05 19:48 ` [PATCH V3 14/7] Orangefs: Swap order of include files hubcap
6 siblings, 0 replies; 10+ messages in thread
From: hubcap @ 2015-08-05 19:48 UTC (permalink / raw)
To: viro; +Cc: Sasha Levin, linux-fsdevel, Mike Marshall
From: Sasha Levin <sasha.levin@oracle.com>
This makes no sense and causes warnings on boot.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
fs/orangefs/pvfs2-mod.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/orangefs/pvfs2-mod.c b/fs/orangefs/pvfs2-mod.c
index 69289c5..d80537d 100644
--- a/fs/orangefs/pvfs2-mod.c
+++ b/fs/orangefs/pvfs2-mod.c
@@ -65,7 +65,7 @@ static struct file_system_type pvfs2_fs_type = {
};
module_param(hash_table_size, int, 0);
-module_param(module_parm_debug_mask, ulong, 0755);
+module_param(module_parm_debug_mask, ulong, 0644);
module_param(op_timeout_secs, int, 0);
module_param(slot_timeout_secs, int, 0);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH V3 14/7] Orangefs: Swap order of include files
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
` (5 preceding siblings ...)
2015-08-05 19:48 ` [PATCH V2 13/7] fs: orangefs: remove execute priviliges from module params hubcap
@ 2015-08-05 19:48 ` hubcap
2015-08-06 9:18 ` Mark Brown
6 siblings, 1 reply; 10+ messages in thread
From: hubcap @ 2015-08-05 19:48 UTC (permalink / raw)
To: viro; +Cc: Guenter Roeck, linux-fsdevel, Mark Brown, Mike Marshall
From: Guenter Roeck <linux@roeck-us.net>
spinlock_types.h requires types from linux/types.h.
Including spinlock_types.h first may result in the following build errors,
as seen with arm:allmodconfig.
arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
Fixes: deb4fb58ff73 ("Orangefs: kernel client part 2")
Cc: Mark Brown <broonie@kernel.org>
Cc: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
fs/orangefs/protocol.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h
index ca7cef9..f571be2 100644
--- a/fs/orangefs/protocol.h
+++ b/fs/orangefs/protocol.h
@@ -1,5 +1,5 @@
-#include <linux/spinlock_types.h>
#include <linux/types.h>
+#include <linux/spinlock_types.h>
#include <linux/slab.h>
#include <linux/ioctl.h>
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH V3 14/7] Orangefs: Swap order of include files
2015-08-05 19:48 ` [PATCH V3 14/7] Orangefs: Swap order of include files hubcap
@ 2015-08-06 9:18 ` Mark Brown
0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2015-08-06 9:18 UTC (permalink / raw)
To: hubcap; +Cc: viro, Guenter Roeck, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
On Wed, Aug 05, 2015 at 03:48:40PM -0400, hubcap wrote:
> From: Guenter Roeck <linux@roeck-us.net>
>
> spinlock_types.h requires types from linux/types.h.
> Including spinlock_types.h first may result in the following build errors,
> as seen with arm:allmodconfig.
Please stop CCing me on this stuff - like I say I'm pretty sure there's
a typo and this was intended to go to someone else.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-08-06 9:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
2015-07-24 19:09 ` [PATCH V3 8/7] Orangefs: kernel client update 1 Mike Marshall
2015-07-28 20:27 ` [PATCH V3 9/7] Orangefs: sooth most sparse complaints hubcap
2015-07-29 19:57 ` [PATCH V3 10/7] Orangefs: address problems found by static checker hubcap
2015-07-30 20:33 ` [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type hubcap
2015-07-31 7:36 ` Christoph Hellwig
2015-07-31 8:26 ` Al Viro
2015-08-05 19:48 ` [PATCH V3 12/7] Orangefs: use inode_set_bytes for directories hubcap
2015-08-05 19:48 ` [PATCH V2 13/7] fs: orangefs: remove execute priviliges from module params hubcap
2015-08-05 19:48 ` [PATCH V3 14/7] Orangefs: Swap order of include files hubcap
2015-08-06 9:18 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.