OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9262922
)
f2fs: inject fault in inc_valid_node_count
author
Chao Yu
<yuchao0@huawei.com>
Mon, 13 Nov 2017 09:32:40 +0000
(17:32 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Thu, 16 Nov 2017 06:03:47 +0000
(22:03 -0800)
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>
fs/f2fs/f2fs.h
patch
|
blob
|
history
diff --git
a/fs/f2fs/f2fs.h
b/fs/f2fs/f2fs.h
index
7569347
..
fc9c00a
100644
(file)
--- a/
fs/f2fs/f2fs.h
+++ b/
fs/f2fs/f2fs.h
@@
-1831,6
+1831,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;