f2fs: fix to show injection rate in ->show_options
Subsystems (2)
PATCH 1/4 f2fs: fix to show injection rate in ->show_options
If fault injection functionality is enabled, show additional injection rate in ->show_options.
Signed-off-by Chao Yu <[email protected]>
--- fs/f2fs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/super.c +2 -1
@@ -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 ))
Signature · 6 lines
2.13.1.388.g69e6b9b4f4a9 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
PATCH 2/4 f2fs: fix to document fault injection option and sysfs file
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 <[email protected]>
--- Documentation/ABI/testing/sysfs-fs-f2fs | 12 ++++++++++++ Documentation/filesystems/f2fs.txt | 2 ++ 2 files changed, 14 insertions(+)
Documentation/ABI/testing/sysfs-fs-f2fs +12 -0
@@ -112,3 +112,15 @@ Date: January 2016 Contact: "Shuoran Liu" <[email protected]> Description: Shows total written kbytes issued to disk. + +What: /sys/fs/f2fs/<disk>/injection_rate +Date: May 2016 +Contact: "Sheng Yong" <[email protected]> +Description: + Contrils the injection rate. + +What: /sys/fs/f2fs/<disk>/injection_type +Date: May 2016 +Contact: "Sheng Yong" <[email protected]> +Description: + Contrils the injection type.
Documentation/filesystems/f2fs.txt +2 -0
@@ -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.
Signature · 6 lines
2.13.1.388.g69e6b9b4f4a9 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
PATCH 3/4 f2fs: fix incorrect document of batched_trim_sections
In reply to Chao YuSigned-off-by Chao Yu <[email protected]>
--- Documentation/ABI/testing/sysfs-fs-f2fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/ABI/testing/sysfs-fs-f2fs +1 -1
@@ -75,7 +75,7 @@ Contact: "Jaegeuk Kim" <[email protected]> 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" <[email protected]> Description:
Signature · 6 lines
2.13.1.388.g69e6b9b4f4a9 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
PATCH 4/4 f2fs: fix wrong error number of fill_super
In reply to Chao YuThis patch fixes incorrect error number in error path of fill_super.
Signed-off-by Chao Yu <[email protected]>
--- fs/f2fs/super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/f2fs/super.c +4 -1
@@ -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 */
Signature · 6 lines
2.13.1.388.g69e6b9b4f4a9 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot