From patchwork Fri Jan 27 01:35:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 92507 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp99345qgi; Thu, 26 Jan 2017 01:40:13 -0800 (PST) X-Received: by 10.99.131.65 with SMTP id h62mr1983474pge.41.1485423613398; Thu, 26 Jan 2017 01:40:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si24120864pgc.59.2017.01.26.01.40.13; Thu, 26 Jan 2017 01:40:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753389AbdAZJkK (ORCPT + 25 others); Thu, 26 Jan 2017 04:40:10 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:51971 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753186AbdAZJkI (ORCPT ); Thu, 26 Jan 2017 04:40:08 -0500 Received: from 172.24.1.60 (EHLO SZXEML423-HUB.china.huawei.com) ([172.24.1.60]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id COM70847; Thu, 26 Jan 2017 17:39:43 +0800 (CST) Received: from linux-2rtt.site (10.108.111.189) by SZXEML423-HUB.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.235.1; Thu, 26 Jan 2017 17:39:33 +0800 From: Kaixu Xia To: , CC: , , , Subject: [PATCH] f2fs: show the fault injection mount option Date: Fri, 27 Jan 2017 09:35:37 +0800 Message-ID: <1485480937-21008-1-git-send-email-xiakaixu@huawei.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Originating-IP: [10.108.111.189] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch shows the fault injection mount option in f2fs_show_options(). Signed-off-by: Kaixu Xia --- fs/f2fs/super.c | 5 +++++ 1 file changed, 5 insertions(+) -- 1.7.10.4 diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 46fd30d..47880b4 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -540,6 +540,7 @@ static int parse_options(struct super_block *sb, char *options) return -EINVAL; #ifdef CONFIG_F2FS_FAULT_INJECTION f2fs_build_fault_attr(sbi, arg); + set_opt(sbi, FAULT_INJECTION); #else f2fs_msg(sb, KERN_INFO, "FAULT_INJECTION was not selected"); @@ -918,6 +919,10 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) else if (test_opt(sbi, LFS)) seq_puts(seq, "lfs"); seq_printf(seq, ",active_logs=%u", sbi->active_logs); +#ifdef CONFIG_F2FS_FAULT_INJECTION + if (test_opt(sbi, FAULT_INJECTION)) + seq_puts(seq, ",fault_injection"); +#endif return 0; }