Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1538135 > unrolled thread

[PATCH 0/8] Sparse warning fixes in Lustre.

Started byOleg Drokin <green@linuxhacker.ru>
First post2016-12-07 23:50 +0100
Last post2016-12-08 00:50 +0100
Articles 11 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/8] Sparse warning fixes in Lustre. Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
    [PATCH 4/8] staging/lustre/lov: make lov_lsm_alloc() static Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
    [PATCH 7/8] staging/lustre: Move lov_read_and_clear_async_rc declaration Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
      Re: [PATCH 7/8] staging/lustre: Move lov_read_and_clear_async_rc  declaration James Simmons <jsimmons@infradead.org> - 2016-12-08 01:30 +0100
    [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return type Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
      Re: [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return  type James Simmons <jsimmons@infradead.org> - 2016-12-08 01:20 +0100
      Re: [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return  type James Simmons <jsimmons@infradead.org> - 2016-12-08 01:30 +0100
    [PATCH 1/8] staging/lustre/llite: move root_squash from sysfs to debugfs Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
      Re: [PATCH 1/8] staging/lustre/llite: move root_squash from sysfs  to debugfs James Simmons <jsimmons@infradead.org> - 2016-12-08 01:50 +0100
    [PATCH 8/8] staging/lustre/ptlrpc: Move nrs_conf_fifo extern to a header Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
    Re: [PATCH 0/8] Sparse warning fixes in Lustre. Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-08 00:50 +0100

#1538135 — [PATCH 0/8] Sparse warning fixes in Lustre.

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 0/8] Sparse warning fixes in Lustre.
Message-ID<sLTcd-6aD-3@gated-at.bofh.it>
This set of fixes aims at sparse warnings.
Most of the patches are just moving declarations around
to deal with the
warning: symbol 'xxx' was not declared. Should it be static?
kind of messages.

Also a screwup with root_squash sysfs control is fixed.

Oleg Drokin (8):
  staging/lustre/llite: move root_squash from sysfs to debugfs
  staging/lustre/ldlm: Correct itree_overlap_cb return type
  staging/lustre/llite: mark ll_io_init() static
  staging/lustre/lov: make lov_lsm_alloc() static
  staging/lustre/osc: extern declare osc_caches in a header
  staging/lustre: Declare lu_context/session_tags_default
  staging/lustre: Move lov_read_and_clear_async_rc declaration
  staging/lustre/ptlrpc: Move nrs_conf_fifo extern to a header

 drivers/staging/lustre/lustre/include/lu_object.h  |  3 +++
 drivers/staging/lustre/lustre/include/obd.h        |  3 +++
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c     |  2 +-
 drivers/staging/lustre/lustre/llite/file.c         |  2 +-
 drivers/staging/lustre/lustre/llite/lproc_llite.c  | 27 ++++++++++++----------
 drivers/staging/lustre/lustre/llite/vvp_internal.h |  2 --
 drivers/staging/lustre/lustre/lov/lov_pack.c       |  3 ++-
 drivers/staging/lustre/lustre/obdclass/cl_object.c |  3 +--
 drivers/staging/lustre/lustre/osc/osc_internal.h   |  2 ++
 drivers/staging/lustre/lustre/osc/osc_request.c    |  2 --
 drivers/staging/lustre/lustre/ptlrpc/nrs.c         |  3 ---
 .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h |  3 +++
 12 files changed, 31 insertions(+), 24 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1538137 — [PATCH 4/8] staging/lustre/lov: make lov_lsm_alloc() static

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 4/8] staging/lustre/lov: make lov_lsm_alloc() static
Message-ID<sLTcd-6aD-21@gated-at.bofh.it>
In reply to#1538135
It's not used anywhere outside of this file.
Highlighted by sparse.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/lov/lov_pack.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lov/lov_pack.c b/drivers/staging/lustre/lustre/lov/lov_pack.c
index 6c93d18..68fa2de 100644
--- a/drivers/staging/lustre/lustre/lov/lov_pack.c
+++ b/drivers/staging/lustre/lustre/lov/lov_pack.c
@@ -198,7 +198,8 @@ static int lov_verify_lmm(void *lmm, int lmm_bytes, __u16 *stripe_count)
 	return rc;
 }
 
-struct lov_stripe_md *lov_lsm_alloc(u16 stripe_count, u32 pattern, u32 magic)
+static struct lov_stripe_md *lov_lsm_alloc(u16 stripe_count, u32 pattern,
+					   u32 magic)
 {
 	struct lov_stripe_md *lsm;
 	unsigned int i;
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1538139 — [PATCH 7/8] staging/lustre: Move lov_read_and_clear_async_rc declaration

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 7/8] staging/lustre: Move lov_read_and_clear_async_rc declaration
Message-ID<sLTcd-6aD-17@gated-at.bofh.it>
In reply to#1538135
Move it to obd.h, so that it's included from both the users and
the actual definition, making sure they never get out of sync.
This also silences a sparse warning.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/obd.h        | 3 +++
 drivers/staging/lustre/lustre/llite/vvp_internal.h | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
index 0f48e9c..1839f4f 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -43,6 +43,7 @@
 #include "lustre_fld.h"
 #include "lustre_handles.h"
 #include "lustre_intent.h"
+#include "cl_object.h"
 
 #define MAX_OBD_DEVICES 8192
 
@@ -76,6 +77,8 @@ static inline void loi_init(struct lov_oinfo *loi)
 struct lov_stripe_md;
 struct obd_info;
 
+int lov_read_and_clear_async_rc(struct cl_object *clob);
+
 typedef int (*obd_enqueue_update_f)(void *cookie, int rc);
 
 /* obd info for a particular level (lov, osc). */
diff --git a/drivers/staging/lustre/lustre/llite/vvp_internal.h b/drivers/staging/lustre/lustre/llite/vvp_internal.h
index c60d041..f40fd7f 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_internal.h
+++ b/drivers/staging/lustre/lustre/llite/vvp_internal.h
@@ -301,8 +301,6 @@ static inline struct vvp_lock *cl2vvp_lock(const struct cl_lock_slice *slice)
 # define CLOBINVRNT(env, clob, expr)					\
 	((void)sizeof(env), (void)sizeof(clob), (void)sizeof(!!(expr)))
 
-int lov_read_and_clear_async_rc(struct cl_object *clob);
-
 int vvp_io_init(const struct lu_env *env, struct cl_object *obj,
 		struct cl_io *io);
 int vvp_io_write_commit(const struct lu_env *env, struct cl_io *io);
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1538207 — Re: [PATCH 7/8] staging/lustre: Move lov_read_and_clear_async_rc declaration

FromJames Simmons <jsimmons@infradead.org>
Date2016-12-08 01:30 +0100
SubjectRe: [PATCH 7/8] staging/lustre: Move lov_read_and_clear_async_rc declaration
Message-ID<sLUKZ-7jL-1@gated-at.bofh.it>
In reply to#1538139
> Move it to obd.h, so that it's included from both the users and
> the actual definition, making sure they never get out of sync.
> This also silences a sparse warning.

Reviewed-by: James Simmons <jsimmons@infradead.org>
 
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
> ---
>  drivers/staging/lustre/lustre/include/obd.h        | 3 +++
>  drivers/staging/lustre/lustre/llite/vvp_internal.h | 2 --
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
> index 0f48e9c..1839f4f 100644
> --- a/drivers/staging/lustre/lustre/include/obd.h
> +++ b/drivers/staging/lustre/lustre/include/obd.h
> @@ -43,6 +43,7 @@
>  #include "lustre_fld.h"
>  #include "lustre_handles.h"
>  #include "lustre_intent.h"
> +#include "cl_object.h"
>  
>  #define MAX_OBD_DEVICES 8192
>  
> @@ -76,6 +77,8 @@ static inline void loi_init(struct lov_oinfo *loi)
>  struct lov_stripe_md;
>  struct obd_info;
>  
> +int lov_read_and_clear_async_rc(struct cl_object *clob);
> +
>  typedef int (*obd_enqueue_update_f)(void *cookie, int rc);
>  
>  /* obd info for a particular level (lov, osc). */
> diff --git a/drivers/staging/lustre/lustre/llite/vvp_internal.h b/drivers/staging/lustre/lustre/llite/vvp_internal.h
> index c60d041..f40fd7f 100644
> --- a/drivers/staging/lustre/lustre/llite/vvp_internal.h
> +++ b/drivers/staging/lustre/lustre/llite/vvp_internal.h
> @@ -301,8 +301,6 @@ static inline struct vvp_lock *cl2vvp_lock(const struct cl_lock_slice *slice)
>  # define CLOBINVRNT(env, clob, expr)					\
>  	((void)sizeof(env), (void)sizeof(clob), (void)sizeof(!!(expr)))
>  
> -int lov_read_and_clear_async_rc(struct cl_object *clob);
> -
>  int vvp_io_init(const struct lu_env *env, struct cl_object *obj,
>  		struct cl_io *io);
>  int vvp_io_write_commit(const struct lu_env *env, struct cl_io *io);
> -- 
> 2.7.4
> 
> 

[toc] | [prev] | [next] | [standalone]


#1538141 — [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return type

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return type
Message-ID<sLTcd-6aD-27@gated-at.bofh.it>
In reply to#1538135
As per interval_search() prototype, the callback should return
enum, not int.
This fixes correspondign sparse warning.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index a4a291a..f4cbc89 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -1148,7 +1148,7 @@ static int lock_matches(struct ldlm_lock *lock, struct lock_match_data *data)
 	return INTERVAL_ITER_STOP;
 }
 
-static unsigned int itree_overlap_cb(struct interval_node *in, void *args)
+static enum interval_iter itree_overlap_cb(struct interval_node *in, void *args)
 {
 	struct ldlm_interval *node = to_ldlm_interval(in);
 	struct lock_match_data *data = args;
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1538200 — Re: [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return type

FromJames Simmons <jsimmons@infradead.org>
Date2016-12-08 01:20 +0100
SubjectRe: [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return type
Message-ID<sLUBj-7gp-11@gated-at.bofh.it>
In reply to#1538141
> As per interval_search() prototype, the callback should return
> enum, not int.
> This fixes correspondign sparse warning.
> 
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>

Reviewed-by: James Simmons <jsimmons@infradead.org>

> ---
>  drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> index a4a291a..f4cbc89 100644
> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> @@ -1148,7 +1148,7 @@ static int lock_matches(struct ldlm_lock *lock, struct lock_match_data *data)
>  	return INTERVAL_ITER_STOP;
>  }
>  
> -static unsigned int itree_overlap_cb(struct interval_node *in, void *args)
> +static enum interval_iter itree_overlap_cb(struct interval_node *in, void *args)
>  {
>  	struct ldlm_interval *node = to_ldlm_interval(in);
>  	struct lock_match_data *data = args;
> -- 
> 2.7.4
> 
> 

[toc] | [prev] | [next] | [standalone]


#1538210 — Re: [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return type

FromJames Simmons <jsimmons@infradead.org>
Date2016-12-08 01:30 +0100
SubjectRe: [PATCH 2/8] staging/lustre/ldlm: Correct itree_overlap_cb return type
Message-ID<sLUL0-7jL-19@gated-at.bofh.it>
In reply to#1538141
> As per interval_search() prototype, the callback should return
> enum, not int.
> This fixes correspondign sparse warning.
> 
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>

Reviewed-by: James Simmons <jsimmons@infradead.org>

> ---
>  drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> index a4a291a..f4cbc89 100644
> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> @@ -1148,7 +1148,7 @@ static int lock_matches(struct ldlm_lock *lock, struct lock_match_data *data)
>  	return INTERVAL_ITER_STOP;
>  }
>  
> -static unsigned int itree_overlap_cb(struct interval_node *in, void *args)
> +static enum interval_iter itree_overlap_cb(struct interval_node *in, void *args)
>  {
>  	struct ldlm_interval *node = to_ldlm_interval(in);
>  	struct lock_match_data *data = args;
> -- 
> 2.7.4
> 
> 

[toc] | [prev] | [next] | [standalone]


#1538142 — [PATCH 1/8] staging/lustre/llite: move root_squash from sysfs to debugfs

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 1/8] staging/lustre/llite: move root_squash from sysfs to debugfs
Message-ID<sLTcd-6aD-29@gated-at.bofh.it>
In reply to#1538135
root_squash control got accidentally moved to sysfs instead of
debugfs, and the write side of it was also broken expecting a
userspace buffer.
It contains both uid and gid values in a single file, so debugfs
is a clear place for it.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Fixes: c948390f10ccc "fix inconsistencies of root squash feature"
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/llite/lproc_llite.c | 27 +++++++++++++----------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index 03682c1..f3ee584 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -924,27 +924,29 @@ static ssize_t ll_unstable_stats_seq_write(struct file *file,
 }
 LPROC_SEQ_FOPS(ll_unstable_stats);
 
-static ssize_t root_squash_show(struct kobject *kobj, struct attribute *attr,
-				char *buf)
+static int ll_root_squash_seq_show(struct seq_file *m, void *v)
 {
-	struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
-					      ll_kobj);
+	struct super_block *sb = m->private;
+	struct ll_sb_info *sbi = ll_s2sbi(sb);
 	struct root_squash_info *squash = &sbi->ll_squash;
 
-	return sprintf(buf, "%u:%u\n", squash->rsi_uid, squash->rsi_gid);
+	seq_printf(m, "%u:%u\n", squash->rsi_uid, squash->rsi_gid);
+	return 0;
 }
 
-static ssize_t root_squash_store(struct kobject *kobj, struct attribute *attr,
-				 const char *buffer, size_t count)
+static ssize_t ll_root_squash_seq_write(struct file *file,
+					const char __user *buffer,
+					size_t count, loff_t *off)
 {
-	struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
-					      ll_kobj);
+	struct seq_file *m = file->private_data;
+	struct super_block *sb = m->private;
+	struct ll_sb_info *sbi = ll_s2sbi(sb);
 	struct root_squash_info *squash = &sbi->ll_squash;
 
 	return lprocfs_wr_root_squash(buffer, count, squash,
-				      ll_get_fsname(sbi->ll_sb, NULL, 0));
+				      ll_get_fsname(sb, NULL, 0));
 }
-LUSTRE_RW_ATTR(root_squash);
+LPROC_SEQ_FOPS(ll_root_squash);
 
 static int ll_nosquash_nids_seq_show(struct seq_file *m, void *v)
 {
@@ -997,6 +999,8 @@ static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
 	{ "statahead_stats",  &ll_statahead_stats_fops, NULL, 0 },
 	{ "unstable_stats",   &ll_unstable_stats_fops, NULL },
 	{ "sbi_flags",	      &ll_sbi_flags_fops, NULL, 0 },
+	{ .name =       "root_squash",
+	  .fops =       &ll_root_squash_fops			},
 	{ .name =		"nosquash_nids",
 	  .fops =		&ll_nosquash_nids_fops		},
 	{ NULL }
@@ -1027,7 +1031,6 @@ static struct attribute *llite_attrs[] = {
 	&lustre_attr_max_easize.attr,
 	&lustre_attr_default_easize.attr,
 	&lustre_attr_xattr_cache.attr,
-	&lustre_attr_root_squash.attr,
 	NULL,
 };
 
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1538222 — Re: [PATCH 1/8] staging/lustre/llite: move root_squash from sysfs to debugfs

FromJames Simmons <jsimmons@infradead.org>
Date2016-12-08 01:50 +0100
SubjectRe: [PATCH 1/8] staging/lustre/llite: move root_squash from sysfs to debugfs
Message-ID<sLV4m-7qb-9@gated-at.bofh.it>
In reply to#1538142
> root_squash control got accidentally moved to sysfs instead of
> debugfs, and the write side of it was also broken expecting a
> userspace buffer.
> It contains both uid and gid values in a single file, so debugfs
> is a clear place for it.

I see why this was missed. The uid/gid pair I needed for my testing
was missing so the test was skipped. I fixed it up and tested this
patch out. Now it passes.

Reviewed-by: James Simmons <jsimmons@infradead.org>
 
> Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
> Fixes: c948390f10ccc "fix inconsistencies of root squash feature"
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
> ---
>  drivers/staging/lustre/lustre/llite/lproc_llite.c | 27 +++++++++++++----------
>  1 file changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
> index 03682c1..f3ee584 100644
> --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
> +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
> @@ -924,27 +924,29 @@ static ssize_t ll_unstable_stats_seq_write(struct file *file,
>  }
>  LPROC_SEQ_FOPS(ll_unstable_stats);
>  
> -static ssize_t root_squash_show(struct kobject *kobj, struct attribute *attr,
> -				char *buf)
> +static int ll_root_squash_seq_show(struct seq_file *m, void *v)
>  {
> -	struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
> -					      ll_kobj);
> +	struct super_block *sb = m->private;
> +	struct ll_sb_info *sbi = ll_s2sbi(sb);
>  	struct root_squash_info *squash = &sbi->ll_squash;
>  
> -	return sprintf(buf, "%u:%u\n", squash->rsi_uid, squash->rsi_gid);
> +	seq_printf(m, "%u:%u\n", squash->rsi_uid, squash->rsi_gid);
> +	return 0;
>  }
>  
> -static ssize_t root_squash_store(struct kobject *kobj, struct attribute *attr,
> -				 const char *buffer, size_t count)
> +static ssize_t ll_root_squash_seq_write(struct file *file,
> +					const char __user *buffer,
> +					size_t count, loff_t *off)
>  {
> -	struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
> -					      ll_kobj);
> +	struct seq_file *m = file->private_data;
> +	struct super_block *sb = m->private;
> +	struct ll_sb_info *sbi = ll_s2sbi(sb);
>  	struct root_squash_info *squash = &sbi->ll_squash;
>  
>  	return lprocfs_wr_root_squash(buffer, count, squash,
> -				      ll_get_fsname(sbi->ll_sb, NULL, 0));
> +				      ll_get_fsname(sb, NULL, 0));
>  }
> -LUSTRE_RW_ATTR(root_squash);
> +LPROC_SEQ_FOPS(ll_root_squash);
>  
>  static int ll_nosquash_nids_seq_show(struct seq_file *m, void *v)
>  {
> @@ -997,6 +999,8 @@ static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
>  	{ "statahead_stats",  &ll_statahead_stats_fops, NULL, 0 },
>  	{ "unstable_stats",   &ll_unstable_stats_fops, NULL },
>  	{ "sbi_flags",	      &ll_sbi_flags_fops, NULL, 0 },
> +	{ .name =       "root_squash",
> +	  .fops =       &ll_root_squash_fops			},
>  	{ .name =		"nosquash_nids",
>  	  .fops =		&ll_nosquash_nids_fops		},
>  	{ NULL }
> @@ -1027,7 +1031,6 @@ static struct attribute *llite_attrs[] = {
>  	&lustre_attr_max_easize.attr,
>  	&lustre_attr_default_easize.attr,
>  	&lustre_attr_xattr_cache.attr,
> -	&lustre_attr_root_squash.attr,
>  	NULL,
>  };
>  
> -- 
> 2.7.4
> 
> 

[toc] | [prev] | [next] | [standalone]


#1538143 — [PATCH 8/8] staging/lustre/ptlrpc: Move nrs_conf_fifo extern to a header

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 8/8] staging/lustre/ptlrpc: Move nrs_conf_fifo extern to a header
Message-ID<sLTce-6aD-31@gated-at.bofh.it>
In reply to#1538135
This avoids having an extern definition in a C file which is bad,
and also silences sparse complaint as well.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/ptlrpc/nrs.c             | 3 ---
 drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/nrs.c b/drivers/staging/lustre/lustre/ptlrpc/nrs.c
index 7b6ffb1..ef19dbe 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/nrs.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/nrs.c
@@ -1559,9 +1559,6 @@ int ptlrpc_nrs_policy_control(const struct ptlrpc_service *svc,
 	return rc;
 }
 
-/* ptlrpc/nrs_fifo.c */
-extern struct ptlrpc_nrs_pol_conf nrs_conf_fifo;
-
 /**
  * Adds all policies that ship with the ptlrpc module, to NRS core's list of
  * policies \e nrs_core.nrs_policies.
diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
index e0f859c..8e6a805 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
+++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
@@ -226,6 +226,9 @@ struct ptlrpc_nrs_policy *nrs_request_policy(struct ptlrpc_nrs_request *nrq)
  sizeof(NRS_LPROCFS_QUANTUM_NAME_REG __stringify(LPROCFS_NRS_QUANTUM_MAX) " "  \
 	NRS_LPROCFS_QUANTUM_NAME_HP __stringify(LPROCFS_NRS_QUANTUM_MAX))
 
+/* ptlrpc/nrs_fifo.c */
+extern struct ptlrpc_nrs_pol_conf nrs_conf_fifo;
+
 /* recovd_thread.c */
 
 int ptlrpc_expire_one_request(struct ptlrpc_request *req, int async_unlink);
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1538191

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2016-12-08 00:50 +0100
Message-ID<sLU8i-6PU-23@gated-at.bofh.it>
In reply to#1538135
On Wed, Dec 07, 2016 at 05:41:26PM -0500, Oleg Drokin wrote:
> This set of fixes aims at sparse warnings.

Speaking of the stuff sparse catches there: class_process_proc_param().
I've tried to describe what I think of that Fine Piece Of Software
several times, but I had to give up - my command of obscenity is not
up to the task, neither in English nor in Russian.  Please, take it
out.  Preferably - along with the ->ldo_process_config()/->process_config()
thing.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web