Message ID | 20211103050039.371277-2-vshankar@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: add sysfs entries signifying new mount syntax support | expand |
On Wed, 2021-11-03 at 10:30 +0530, Venky Shankar wrote: > Add read-only paramaters for supported mount syntaxes. Primary > user is the user-space mount helper for catching v2 syntax bugs > during testing by cross verifying if the kernel supports v2 syntax > on mount failure. > > Signed-off-by: Venky Shankar <vshankar@redhat.com> > --- > fs/ceph/super.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/fs/ceph/super.c b/fs/ceph/super.c > index 609ffc8c2d78..32e5240e33a0 100644 > --- a/fs/ceph/super.c > +++ b/fs/ceph/super.c > @@ -1452,6 +1452,14 @@ bool disable_send_metrics = false; > module_param_cb(disable_send_metrics, ¶m_ops_metrics, &disable_send_metrics, 0644); > MODULE_PARM_DESC(disable_send_metrics, "Enable sending perf metrics to ceph cluster (default: on)"); > > +/* for both v1 and v2 syntax */ > +bool mount_support = true; > +static const struct kernel_param_ops param_ops_mount_syntax = { > + .get = param_get_bool, > +}; > +module_param_cb(mount_syntax_v1, ¶m_ops_mount_syntax, &mount_support, 0444); > +module_param_cb(mount_syntax_v2, ¶m_ops_mount_syntax, &mount_support, 0444); > + > module_init(init_ceph); > module_exit(exit_ceph); > Thanks Venky. This looks good. Merged into testing. Note that these new parameters are not visible via modinfo, but they do show up in /sys/module/ceph/parameters.
On Wed, 2021-11-03 at 10:30 +0530, Venky Shankar wrote: > Add read-only paramaters for supported mount syntaxes. Primary > user is the user-space mount helper for catching v2 syntax bugs > during testing by cross verifying if the kernel supports v2 syntax > on mount failure. > > Signed-off-by: Venky Shankar <vshankar@redhat.com> > --- > fs/ceph/super.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/fs/ceph/super.c b/fs/ceph/super.c > index 609ffc8c2d78..32e5240e33a0 100644 > --- a/fs/ceph/super.c > +++ b/fs/ceph/super.c > @@ -1452,6 +1452,14 @@ bool disable_send_metrics = false; > module_param_cb(disable_send_metrics, ¶m_ops_metrics, &disable_send_metrics, 0644); > MODULE_PARM_DESC(disable_send_metrics, "Enable sending perf metrics to ceph cluster (default: on)"); > > +/* for both v1 and v2 syntax */ > +bool mount_support = true; This bool should be static too. I'll just make that change in-tree, so you don't need to re-post. Thanks, > +static const struct kernel_param_ops param_ops_mount_syntax = { > + .get = param_get_bool, > +}; > +module_param_cb(mount_syntax_v1, ¶m_ops_mount_syntax, &mount_support, 0444); > +module_param_cb(mount_syntax_v2, ¶m_ops_mount_syntax, &mount_support, 0444); > + > module_init(init_ceph); > module_exit(exit_ceph); >
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 609ffc8c2d78..32e5240e33a0 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -1452,6 +1452,14 @@ bool disable_send_metrics = false; module_param_cb(disable_send_metrics, ¶m_ops_metrics, &disable_send_metrics, 0644); MODULE_PARM_DESC(disable_send_metrics, "Enable sending perf metrics to ceph cluster (default: on)"); +/* for both v1 and v2 syntax */ +bool mount_support = true; +static const struct kernel_param_ops param_ops_mount_syntax = { + .get = param_get_bool, +}; +module_param_cb(mount_syntax_v1, ¶m_ops_mount_syntax, &mount_support, 0444); +module_param_cb(mount_syntax_v2, ¶m_ops_mount_syntax, &mount_support, 0444); + module_init(init_ceph); module_exit(exit_ceph);
Add read-only paramaters for supported mount syntaxes. Primary user is the user-space mount helper for catching v2 syntax bugs during testing by cross verifying if the kernel supports v2 syntax on mount failure. Signed-off-by: Venky Shankar <vshankar@redhat.com> --- fs/ceph/super.c | 8 ++++++++ 1 file changed, 8 insertions(+)