diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-11-13 17:32:40 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-11-13 20:21:35 -0800 |
commit | 812c60564ca721a2527ed069c9221ec348368fd7 (patch) | |
tree | 080df250727189d45aa2ab0feda4a8e268af69dc /fs/f2fs | |
parent | 28cfafb73853f0494b06649716687a3ea07681d5 (diff) | |
download | op-kernel-dev-812c60564ca721a2527ed069c9221ec348368fd7.zip op-kernel-dev-812c60564ca721a2527ed069c9221ec348368fd7.tar.gz |
f2fs: inject fault in inc_valid_node_count
This patch adds missing fault injection in inc_valid_node_count.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/f2fs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 44f8744..ca6b0c9 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1770,6 +1770,13 @@ static inline int inc_valid_node_count(struct f2fs_sb_info *sbi, return ret; } +#ifdef CONFIG_F2FS_FAULT_INJECTION + if (time_to_inject(sbi, FAULT_BLOCK)) { + f2fs_show_injection_info(FAULT_BLOCK); + goto enospc; + } +#endif + spin_lock(&sbi->stat_lock); valid_block_count = sbi->total_valid_block_count + 1; |