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

Signed-off-by: Jaegeuk Kim <[email protected]>
---
 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


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to