Skip to contentSkip to conversation

f2fs: avoid ENOSPC fault in the recovery process

PATCH New Jaegeuk Kim 1 participant 1 message May 19, 2016

Subsystems (2)
lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 f2fs: avoid ENOSPC fault in the recovery process

This patch avoids impossible error injection, ENOSPC, during recovery process.

---
 fs/f2fs/recovery.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/f2fs/recovery.c +4 -0
index f89b70e..3d7216d 100644
@@ -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);
 			}
Signature · 1 line
2.6.3