aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/dir.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2016-09-23 21:30:09 +0800
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:34:11 +0200
commit16f5fd6356016647113d47057a7259594d6d13e0 (patch)
tree2bf5773348f810be3dd70d388b4ad1f704e3d7cb /fs/f2fs/dir.c
parenta1f42e5a925e97ba4c56fd77623676c0ade992b0 (diff)
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> Conflicts: fs/f2fs/super.c
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r--fs/f2fs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 6af1a6ee7..38d83d3cf 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -546,7 +546,7 @@ int f2fs_add_regular_entry(struct inode *dir, const struct qstr *new_name,
start:
#ifdef CONFIG_F2FS_FAULT_INJECTION
- if (time_to_inject(FAULT_DIR_DEPTH))
+ if (time_to_inject(F2FS_I_SB(dir), FAULT_DIR_DEPTH))
return -ENOSPC;
#endif
if (unlikely(current_depth == MAX_DIR_HASH_DEPTH))