* [PATCH] f2fs: avoid ENOSPC fault in the recovery process
@ 2016-05-19 19:00 Jaegeuk Kim
0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2016-05-19 19:00 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
This patch avoids impossible error injection, ENOSPC, during recovery process.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/recovery.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index f89b70e..3d7216d 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -470,6 +470,10 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
if (src == NULL_ADDR) {
err = reserve_new_block(&dn);
+#ifdef CONFIG_F2FS_FAULT_INJECTION
+ while (err)
+ err = reserve_new_block(&dn);
+#endif
/* We should not get -ENOSPC */
f2fs_bug_on(sbi, err);
}
--
2.6.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-19 19:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-19 19:00 [PATCH] f2fs: avoid ENOSPC fault in the recovery process Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).