On Tue, Feb 6, 2018 at 2:54 PM, Chengguang Xu <cgxu519@xxxxxxxxxx> wrote: > Minor cleanups of showing options for mount and client. > > Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxx> > --- > Changes since v1: > - Do not change comma seqence in ceph_print_client_options() > because there is another caller from different path. > > fs/ceph/super.c | 13 ++----------- > net/ceph/ceph_common.c | 3 +++ > 2 files changed, 5 insertions(+), 11 deletions(-) > > diff --git a/fs/ceph/super.c b/fs/ceph/super.c > index bfc85b2..7f1e212 100644 > --- a/fs/ceph/super.c > +++ b/fs/ceph/super.c > @@ -489,21 +489,12 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) > { > struct ceph_fs_client *fsc = ceph_sb_to_client(root->d_sb); > struct ceph_mount_options *fsopt = fsc->mount_options; > - size_t pos; > int ret; > > - /* a comma between MNT/MS and client options */ > - seq_putc(m, ','); > - pos = m->count; > - > ret = ceph_print_client_options(m, fsc->client); > if (ret) > return ret; > > - /* retract our comma if no client options */ > - if (m->count == pos) > - m->count--; > - > if (fsopt->flags & CEPH_MOUNT_OPT_DIRSTAT) > seq_puts(m, ",dirstat"); > if ((fsopt->flags & CEPH_MOUNT_OPT_RBYTES)) > @@ -514,7 +505,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"); > } > @@ -529,7 +520,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) I don't think changing the way commas work is worth it. If you resend just the seq_printf -> seq_show_option bits, I'll take that patch. Thanks, Ilya -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html