Message ID | 1518485459-199037-1-git-send-email-cgxu519@icloud.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Feb 13, 2018 at 2:30 AM, Chengguang Xu <cgxu519@icloud.com> wrote: > Using seq_show_option to replace seq_printf for string type options. > > Signed-off-by: Chengguang Xu <cgxu519@icloud.com> > --- > fs/ceph/super.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ceph/super.c b/fs/ceph/super.c > index a62d2a9..d8a33ad 100644 > --- a/fs/ceph/super.c > +++ b/fs/ceph/super.c > @@ -512,7 +512,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) > seq_puts(m, ",nodcache"); > if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) { > if (fsopt->fscache_uniq) > - seq_printf(m, ",fsc=%s", fsopt->fscache_uniq); > + seq_show_option(m, "fsc", fsopt->fscache_uniq); > else > seq_puts(m, ",fsc"); Hi Chengguang, seq_show_option() should be able to handle !fsopt->fscache_uniq? Thanks, Ilya -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> 在 2018年2月13日,下午5:45,Ilya Dryomov <idryomov@gmail.com> 写道: > > On Tue, Feb 13, 2018 at 2:30 AM, Chengguang Xu <cgxu519@icloud.com> wrote: >> Using seq_show_option to replace seq_printf for string type options. >> >> Signed-off-by: Chengguang Xu <cgxu519@icloud.com> >> --- >> fs/ceph/super.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/fs/ceph/super.c b/fs/ceph/super.c >> index a62d2a9..d8a33ad 100644 >> --- a/fs/ceph/super.c >> +++ b/fs/ceph/super.c >> @@ -512,7 +512,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) >> seq_puts(m, ",nodcache"); >> if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) { >> if (fsopt->fscache_uniq) >> - seq_printf(m, ",fsc=%s", fsopt->fscache_uniq); >> + seq_show_option(m, "fsc", fsopt->fscache_uniq); >> else >> seq_puts(m, ",fsc"); > > Hi Chengguang, > > seq_show_option() should be able to handle !fsopt->fscache_uniq? Hi Ilya Sorry, I don’t get your point here. Thanks, Chengguang.-- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Feb 13, 2018 at 11:55 AM, Chengguang Xu <cgxu519@icloud.com> wrote: > >> 在 2018年2月13日,下午5:45,Ilya Dryomov <idryomov@gmail.com> 写道: >> >> On Tue, Feb 13, 2018 at 2:30 AM, Chengguang Xu <cgxu519@icloud.com> wrote: >>> Using seq_show_option to replace seq_printf for string type options. >>> >>> Signed-off-by: Chengguang Xu <cgxu519@icloud.com> >>> --- >>> fs/ceph/super.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/fs/ceph/super.c b/fs/ceph/super.c >>> index a62d2a9..d8a33ad 100644 >>> --- a/fs/ceph/super.c >>> +++ b/fs/ceph/super.c >>> @@ -512,7 +512,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) >>> seq_puts(m, ",nodcache"); >>> if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) { >>> if (fsopt->fscache_uniq) >>> - seq_printf(m, ",fsc=%s", fsopt->fscache_uniq); >>> + seq_show_option(m, "fsc", fsopt->fscache_uniq); >>> else >>> seq_puts(m, ",fsc"); >> >> Hi Chengguang, >> >> seq_show_option() should be able to handle !fsopt->fscache_uniq? > > Hi Ilya > > Sorry, I don’t get your point here. I think it can be just if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) seq_show_option(m, "fsc", fsopt->fscache_uniq); Thanks, Ilya -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> 在 2018年2月13日,下午7:52,Ilya Dryomov <idryomov@gmail.com> 写道: > > On Tue, Feb 13, 2018 at 11:55 AM, Chengguang Xu <cgxu519@icloud.com> wrote: >> >>> 在 2018年2月13日,下午5:45,Ilya Dryomov <idryomov@gmail.com> 写道: >>> >>> On Tue, Feb 13, 2018 at 2:30 AM, Chengguang Xu <cgxu519@icloud.com> wrote: >>>> Using seq_show_option to replace seq_printf for string type options. >>>> >>>> Signed-off-by: Chengguang Xu <cgxu519@icloud.com> >>>> --- >>>> fs/ceph/super.c | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/fs/ceph/super.c b/fs/ceph/super.c >>>> index a62d2a9..d8a33ad 100644 >>>> --- a/fs/ceph/super.c >>>> +++ b/fs/ceph/super.c >>>> @@ -512,7 +512,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) >>>> seq_puts(m, ",nodcache"); >>>> if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) { >>>> if (fsopt->fscache_uniq) >>>> - seq_printf(m, ",fsc=%s", fsopt->fscache_uniq); >>>> + seq_show_option(m, "fsc", fsopt->fscache_uniq); >>>> else >>>> seq_puts(m, ",fsc"); >>> >>> Hi Chengguang, >>> >>> seq_show_option() should be able to handle !fsopt->fscache_uniq? >> >> Hi Ilya >> >> Sorry, I don’t get your point here. > > I think it can be just > > if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) > seq_show_option(m, "fsc", fsopt->fscache_uniq); Yes, it can work well in this case, I’ll resend revised version. Thanks, Chengguang. -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index a62d2a9..d8a33ad 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -512,7 +512,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) seq_puts(m, ",nodcache"); if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) { if (fsopt->fscache_uniq) - seq_printf(m, ",fsc=%s", fsopt->fscache_uniq); + seq_show_option(m, "fsc", fsopt->fscache_uniq); else seq_puts(m, ",fsc"); } @@ -527,7 +527,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) #endif if (fsopt->mds_namespace) - seq_printf(m, ",mds_namespace=%s", fsopt->mds_namespace); + seq_show_option(m, "mds_namespace", fsopt->mds_namespace); if (fsopt->wsize) seq_printf(m, ",wsize=%d", fsopt->wsize); if (fsopt->rsize != CEPH_MAX_READ_SIZE)
Using seq_show_option to replace seq_printf for string type options. Signed-off-by: Chengguang Xu <cgxu519@icloud.com> --- fs/ceph/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)