diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-09-23 16:30:09 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-10-01 03:34:31 +0300 |
commit | 1ecc0c5c50ce8834f7e35b63be7480bf1aaa4155 (patch) | |
tree | ab29e8f69b8e2a40064fe7f8f81bea86d7f4a3a7 /fs/f2fs/node.c | |
parent | d32853de5080e7f0c2962de0058ea71d1e244f76 (diff) | |
download | linux-1ecc0c5c50ce8834f7e35b63be7480bf1aaa4155.tar.xz |
f2fs: support configuring fault injection per superblock
Previously, we only support global fault injection configuration, so that
when we configure type/rate of fault injection through sysfs, mount
option, it will influence all f2fs partition which is being used.
It is not make sence, since it will be not convenient if developer want
to test separated partitions with different fault injection rate/type
simultaneously, also it's not possible to enable fault injection in one
partition and disable fault injection in other one.
>From now on, we move global configuration of fault injection in module
into per-superblock, hence injection testing can be more flexible.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 55c22a9c4f9e..9faddcd068d9 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1839,7 +1839,7 @@ bool alloc_nid(struct f2fs_sb_info *sbi, nid_t *nid) struct free_nid *i = NULL; retry: #ifdef CONFIG_F2FS_FAULT_INJECTION - if (time_to_inject(FAULT_ALLOC_NID)) + if (time_to_inject(sbi, FAULT_ALLOC_NID)) return false; #endif if (unlikely(sbi->total_valid_node_count + 1 > nm_i->available_nids)) |