2015-02-25 21:47:31

by Jaegeuk Kim

[permalink] [raw]
Subject: [PATCH 1/2] f2fs: remove obsolete code

This patch removes obsolete code in which summary variable is not needed.

Signed-off-by: Jaegeuk Kim <[email protected]>
---
fs/f2fs/recovery.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 188a034..b2a92d4 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -407,8 +407,6 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
dn.ofs_in_node++;
}

- /* write node page in place */
- set_summary(&sum, dn.nid, 0, 0);
if (IS_INODE(dn.node_page))
sync_inode_page(&dn);

--
2.1.1


2015-02-25 21:56:43

by Jaegeuk Kim

[permalink] [raw]
Subject: [PATCH 2/2] f2fs: avoid wrong error during recovery

From: Jaegeuk Kim <[email protected]>

During the roll-forward recovery, -ENOENT for f2fs_iget can be skipped.
So, this error value should not be propagated.

Change-Id: I230ad2371e3fb4b9df42059c4a61f92c1f9838de
Signed-off-by: Jaegeuk Kim <[email protected]>
---
fs/f2fs/recovery.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index b2a92d4..6e40874 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -212,8 +212,10 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
if (IS_ERR(entry->inode)) {
err = PTR_ERR(entry->inode);
kmem_cache_free(fsync_entry_slab, entry);
- if (err == -ENOENT)
+ if (err == -ENOENT) {
+ err = 0;
goto next;
+ }
break;
}
list_add_tail(&entry->list, head);
--
2.1.1

2015-02-26 01:16:10

by Chao Yu

[permalink] [raw]
Subject: RE: [f2fs-dev] [PATCH 2/2] f2fs: avoid wrong error during recovery

> -----Original Message-----
> From: Jaegeuk Kim [mailto:[email protected]]
> Sent: Thursday, February 26, 2015 5:47 AM
> To: [email protected]; [email protected];
> [email protected]
> Cc: Jaegeuk Kim
> Subject: [f2fs-dev] [PATCH 2/2] f2fs: avoid wrong error during recovery
>
> From: Jaegeuk Kim <[email protected]>
>
> During the roll-forward recovery, -ENOENT for f2fs_iget can be skipped.
> So, this error value should not be propagated.
>
> Change-Id: I230ad2371e3fb4b9df42059c4a61f92c1f9838de
> Signed-off-by: Jaegeuk Kim <[email protected]>

Reviewed-by: Chao Yu <[email protected]>