Skip to contentSkip to conversation

fsck.f2fs: no need to fix SIT type for COLD_DATA

PATCH New Jaegeuk Kim 1 participant 1 message Nov 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsck.f2fs: no need to fix SIT type for COLD_DATA

If hot or warm data blocks were moved to the cold log, we should remain them in the cold log.

---
 fsck/fsck.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
fsck/fsck.c +7 -3
index f7309d6..09bb26f 100644
@@ -1007,9 +1007,13 @@ int check_sit_types(struct f2fs_sb_info *sbi)
 
 		se = get_seg_entry(sbi, i);
 		if (se->orig_type != se->type) {
-			FIX_MSG("Wrong segment type [0x%x] %x -> %x",
-					i, se->orig_type, se->type);
-			err = -EINVAL;
+			if (se->orig_type == CURSEG_COLD_DATA) {
+				se->type = se->orig_type;
+			} else {
+				FIX_MSG("Wrong segment type [0x%x] %x -> %x",
+						i, se->orig_type, se->type);
+				err = -EINVAL;
+			}
 		}
 	}
 	return err;
Signature · 9 lines
2.1.1


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk