Skip to contentSkip to conversation

f2fs: don't trigger recovery for normal umount image

PATCH In review Chao Yu 2 participants 3 messages Jan 31, 2015 – Feb 5, 2015 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/2 f2fs: don't trigger recovery for normal umount image

Our recovery option is on by default, so we will try to recover data for a normally umounted image when mounting it, but no data will be recovered.

So it'd be better to skip the recovery for above condition.

---
 fs/f2fs/recovery.c | 3 +++
 1 file changed, 3 insertions(+)
fs/f2fs/recovery.c +3 -0
index 188a034..c80c286 100644
@@ -500,6 +500,9 @@ int recover_fsync_data(struct f2fs_sb_info *sbi)
 	int err;
 	bool need_writecp = false;
 
+	if (is_set_ckpt_flags(sbi->ckpt, CP_UMOUNT_FLAG))
+		return 0;
+
 	fsync_entry_slab = f2fs_kmem_cache_create("f2fs_fsync_inode_entry",
 			sizeof(struct fsync_inode_entry));
 	if (!fsync_entry_slab)
Signature · 1 line
2.2.1
maintainer
#1 lore raw

Hi Chao,

Quoted 4 lines · Chao Yu

Our recovery option is on by default, so we will try to recover data for a normally umounted image when mounting it, but no data will be recovered.

So it'd be better to skip the recovery for above condition.

No.
We should consider the existing UMOUNT flag written by old f2fs.

Thanks,

Quoted 22 lines
---
 fs/f2fs/recovery.c | 3 +++
 1 file changed, 3 insertions(+)
fs/f2fs/recovery.c +3 -0
index 188a034..c80c286 100644
@@ -500,6 +500,9 @@ int recover_fsync_data(struct f2fs_sb_info *sbi)
 	int err;
 	bool need_writecp = false;
 
+	if (is_set_ckpt_flags(sbi->ckpt, CP_UMOUNT_FLAG))
+		return 0;
+
 	fsync_entry_slab = f2fs_kmem_cache_create("f2fs_fsync_inode_entry",
 			sizeof(struct fsync_inode_entry));
 	if (!fsync_entry_slab)
Signature · 1 line
2.2.1
author
#2 lore raw

Hi Jaegeuk,

Quoted 9 lines

-----Original Message-----
From: Jaegeuk Kim [mailto:[email protected]]
Sent: Tuesday, February 03, 2015 7:32 AM
To: Chao Yu
Cc: Changman Lee; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] f2fs: don't trigger recovery for normal umount image

Hi Chao,

Quoted 8 lines
Quoted 4 lines · Chao Yu

Our recovery option is on by default, so we will try to recover data for a normally umounted image when mounting it, but no data will be recovered.

So it'd be better to skip the recovery for above condition.

No.
We should consider the existing UMOUNT flag written by old f2fs.

You're right, compatibility should be considered, my mistaken.

Please ignore this patch.

Thanks,