From patchwork Thu Feb 15 07:39:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10220517 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB3EE60467 for ; Thu, 15 Feb 2018 07:39:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C781329082 for ; Thu, 15 Feb 2018 07:39:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA8782908A; Thu, 15 Feb 2018 07:39:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7726829082 for ; Thu, 15 Feb 2018 07:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754852AbeBOHjx (ORCPT ); Thu, 15 Feb 2018 02:39:53 -0500 Received: from mr11p00im-asmtp004.me.com ([17.110.69.135]:17935 "EHLO mr11p00im-asmtp004.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754824AbeBOHjw (ORCPT ); Thu, 15 Feb 2018 02:39:52 -0500 Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P4600N00KVTJ200@mr11p00im-asmtp004.me.com> for ceph-devel@vger.kernel.org; Thu, 15 Feb 2018 07:39:13 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1518680353; bh=XxqeRr3G+A/atDDQd82NdJiEUv0e00MyO6zAM0r2d+A=; h=From:To:Subject:Date:Message-id; b=RtRUKspwAG+EkoP56zRUKXpSTVts7h+jpvrJ6YKSK0ZAZ194EzdmHxtYkXcynxlys oP5E1CPvzaGPQdo4fWkqpDg8Nm60HWEO7ZZ1lOkJAy7PI+z0ts7lw+VeHRvU3LcVN9 58hXcJ1r3lRD/NPZcTEsVcxfEFnoCyfurbdNeEb1iX3Su+VFOT8NI6shdIo+B6fus3 Zbd55EYejpyBtlm75GfkgenTJ4+tehCgBEg5T/LUNYIxlN5VIajEEVIIHQf6a7QHlE si8JhTdzHU21bG8gu92T6P0Mep991dF/ili7DlIm6U1sfhjLAYcwgcfl9DoGCxYAEh oAyRabKYand1A== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P4600MQ8L981Y20@mr11p00im-asmtp004.me.com>; Thu, 15 Feb 2018 07:39:12 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-15_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1802150098 From: Chengguang Xu To: idryomov@gmail.com Cc: ceph-devel@vger.kernel.org, Chengguang Xu Subject: [PATCH v2] ceph: use seq_show_option for string type options Date: Thu, 15 Feb 2018 15:39:05 +0800 Message-id: <1518680345-17700-1-git-send-email-cgxu519@icloud.com> X-Mailer: git-send-email 1.8.3.1 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Using seq_show_option to replace seq_printf for string type options. Signed-off-by: Chengguang Xu --- Changes since v1: - Code cleanup for showing fscache related options. fs/ceph/super.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index a62d2a9..f9418d4 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -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)