diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-04-29 16:29:22 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-07 10:32:24 -0700 |
commit | cb78942b821380913e6810375c9ce72858e64c4f (patch) | |
tree | 1106e5e49216f247f4c373192c71a382b9065fe0 /fs/f2fs/node.c | |
parent | c41f3cc3ae34acdbcec328084b4b74f686c02f0d (diff) |
f2fs: inject ENOSPC failures
This patch injects ENOSPC failures.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index af010f5c4ee1..78b98db48805 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1838,6 +1838,10 @@ bool alloc_nid(struct f2fs_sb_info *sbi, nid_t *nid) struct f2fs_nm_info *nm_i = NM_I(sbi); struct free_nid *i = NULL; retry: +#ifdef CONFIG_F2FS_FAULT_INJECTION + if (time_to_inject(FAULT_ALLOC_NID)) + return false; +#endif if (unlikely(sbi->total_valid_node_count + 1 > nm_i->available_nids)) return false; |