Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663182 > unrolled thread

[PATCH 1/4] f2fs: fix to show injection rate in ->show_options

Started byChao Yu <yuchao0@huawei.com>
First post2017-06-12 03:50 +0200
Last post2017-06-12 03:50 +0200
Articles 4 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/4] f2fs: fix to show injection rate in ->show_options Chao Yu <yuchao0@huawei.com> - 2017-06-12 03:50 +0200
    [PATCH 3/4] f2fs: fix incorrect document of batched_trim_sections Chao Yu <yuchao0@huawei.com> - 2017-06-12 03:50 +0200
    [PATCH 4/4] f2fs: fix wrong error number of fill_super Chao Yu <yuchao0@huawei.com> - 2017-06-12 03:50 +0200
    [PATCH 2/4] f2fs: fix to document fault injection option and sysfs file Chao Yu <yuchao0@huawei.com> - 2017-06-12 03:50 +0200

#1663182 — [PATCH 1/4] f2fs: fix to show injection rate in ->show_options

FromChao Yu <yuchao0@huawei.com>
Date2017-06-12 03:50 +0200
Subject[PATCH 1/4] f2fs: fix to show injection rate in ->show_options
Message-ID<tRmEp-45C-3@gated-at.bofh.it>
If fault injection functionality is enabled, show additional injection
rate in ->show_options.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/super.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 02cda00284e1..1c05763616b2 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -995,7 +995,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
 		seq_printf(seq, ",io_size=%uKB", F2FS_IO_SIZE_KB(sbi));
 #ifdef CONFIG_F2FS_FAULT_INJECTION
 	if (test_opt(sbi, FAULT_INJECTION))
-		seq_puts(seq, ",fault_injection");
+		seq_printf(seq, ",fault_injection=%u",
+				sbi->fault_info.inject_rate);
 #endif
 #ifdef CONFIG_FS_DAX
 	if (test_opt(sbi, DAX))
-- 
2.13.1.388.g69e6b9b4f4a9

[toc] | [next] | [standalone]


#1663183 — [PATCH 3/4] f2fs: fix incorrect document of batched_trim_sections

FromChao Yu <yuchao0@huawei.com>
Date2017-06-12 03:50 +0200
Subject[PATCH 3/4] f2fs: fix incorrect document of batched_trim_sections
Message-ID<tRmEp-45C-5@gated-at.bofh.it>
In reply to#1663182
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 Documentation/ABI/testing/sysfs-fs-f2fs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
index ae59451865a6..ffe97abd080a 100644
--- a/Documentation/ABI/testing/sysfs-fs-f2fs
+++ b/Documentation/ABI/testing/sysfs-fs-f2fs
@@ -75,7 +75,7 @@ Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
 Description:
 		 Controls the memory footprint used by f2fs.
 
-What:		/sys/fs/f2fs/<disk>/trim_sections
+What:		/sys/fs/f2fs/<disk>/batched_trim_sections
 Date:		February 2015
 Contact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
 Description:
-- 
2.13.1.388.g69e6b9b4f4a9

[toc] | [prev] | [next] | [standalone]


#1663184 — [PATCH 4/4] f2fs: fix wrong error number of fill_super

FromChao Yu <yuchao0@huawei.com>
Date2017-06-12 03:50 +0200
Subject[PATCH 4/4] f2fs: fix wrong error number of fill_super
Message-ID<tRmEp-45C-7@gated-at.bofh.it>
In reply to#1663182
This patch fixes incorrect error number in error path of fill_super.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/super.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 1c05763616b2..b26ae4d648cb 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1945,6 +1945,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 	if (f2fs_sb_mounted_blkzoned(sb)) {
 		f2fs_msg(sb, KERN_ERR,
 			 "Zoned block device support is not enabled\n");
+		err = -EOPNOTSUPP;
 		goto free_sb_buf;
 	}
 #endif
@@ -2016,8 +2017,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 	if (F2FS_IO_SIZE(sbi) > 1) {
 		sbi->write_io_dummy =
 			mempool_create_page_pool(2 * (F2FS_IO_SIZE(sbi) - 1), 0);
-		if (!sbi->write_io_dummy)
+		if (!sbi->write_io_dummy) {
+			err = -ENOMEM;
 			goto free_options;
+		}
 	}
 
 	/* get an inode for meta space */
-- 
2.13.1.388.g69e6b9b4f4a9

[toc] | [prev] | [next] | [standalone]


#1663186 — [PATCH 2/4] f2fs: fix to document fault injection option and sysfs file

FromChao Yu <yuchao0@huawei.com>
Date2017-06-12 03:50 +0200
Subject[PATCH 2/4] f2fs: fix to document fault injection option and sysfs file
Message-ID<tRmEp-45C-11@gated-at.bofh.it>
In reply to#1663182
Commit 73faec4d9935 ("f2fs: add mount option to select fault injection
ratio") and Commit 087968974fcd ("f2fs: add fault injection to sysfs")
forget to document mount option and sysfs file.

This patch fixes to document them.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 Documentation/ABI/testing/sysfs-fs-f2fs | 12 ++++++++++++
 Documentation/filesystems/f2fs.txt      |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
index a809f6005f14..ae59451865a6 100644
--- a/Documentation/ABI/testing/sysfs-fs-f2fs
+++ b/Documentation/ABI/testing/sysfs-fs-f2fs
@@ -112,3 +112,15 @@ Date:		January 2016
 Contact:	"Shuoran Liu" <liushuoran@huawei.com>
 Description:
 		 Shows total written kbytes issued to disk.
+
+What:		/sys/fs/f2fs/<disk>/injection_rate
+Date:		May 2016
+Contact:	"Sheng Yong" <shengyong1@huawei.com>
+Description:
+		 Contrils the injection rate.
+
+What:		/sys/fs/f2fs/<disk>/injection_type
+Date:		May 2016
+Contact:	"Sheng Yong" <shengyong1@huawei.com>
+Description:
+		 Contrils the injection type.
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index 4f6531a4701b..8b04a6359530 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -155,6 +155,8 @@ noinline_data          Disable the inline data feature, inline data feature is
                        enabled by default.
 data_flush             Enable data flushing before checkpoint in order to
                        persist data of regular and symlink.
+fault_injection=%d     Enable fault injection in all supported types with
+                       specified injection rate.
 mode=%s                Control block allocation mode which supports "adaptive"
                        and "lfs". In "lfs" mode, there should be no random
                        writes towards main area.
-- 
2.13.1.388.g69e6b9b4f4a9

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web