ceph: use seq_show_option for string type options
PATCH v2 1/1 ceph: use seq_show_option for string type options
Using seq_show_option to replace seq_printf for string type options.
Signed-off-by Chengguang Xu <[email protected]>
---
Changes since v1:
- Code cleanup for showing fscache related options.
fs/ceph/super.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
fs/ceph/super.c +2 -5
@@ -511,10 +511,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)if ((fsopt->flags &CEPH_MOUNT_OPT_DCACHE ) ==0 )seq_puts (m,",nodcache" );if (fsopt->flags &CEPH_MOUNT_OPT_FSCACHE ) { -if (fsopt->fscache_uniq) -seq_printf (m,",fsc=%s" , fsopt->fscache_uniq); -else -seq_puts (m,",fsc" ); +seq_show_option (m,"fsc" , fsopt->fscache_uniq); }if (fsopt->flags &CEPH_MOUNT_OPT_NOPOOLPERM )seq_puts (m,",nopoolperm" );
@@ -527,7 +524,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 )
Signature · 1 line
1.8.3.1
Quoted 27 lines · Chengguang Xu
Using
seq_show_optionto replaceseq_printffor string type options.Signed-off-by Chengguang Xu <[email protected]>---
Changes since v1:
- Code cleanup for showing fscache related options.fs/ceph/super.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)fs/ceph/super.c +1
-4@@ -511,10 +511,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)if ((fsopt->flags &CEPH_MOUNT_OPT_DCACHE ) ==0 )seq_puts (m,",nodcache" );if (fsopt->flags &CEPH_MOUNT_OPT_FSCACHE ) { -if (fsopt->fscache_uniq) -seq_printf (m,",fsc=%s" , fsopt->fscache_uniq); -else -seq_puts (m,",fsc" ); +seq_show_option (m,"fsc" , fsopt->fscache_uniq); }if (fsopt->flags &CEPH_MOUNT_OPT_NOPOOLPERM )seq_puts (m,",nopoolperm" );
fs/ceph/super.c static int ceph_show_options(struct seq_file *m, struct dentry *root) · line 530
Quoted 8 lines
fs/ceph/super.c +1
-1@@ -527,7 +524,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 )
Applied.
Thanks,
Ilya