Hi guys,
I found this really an issue, we assume that an NID==X
1. is marked as used in NAT
2. but marked as free in NAT journal
The above assumption hold when NAT cache of X was flushed to NAT journal in stead of NAT
With this assumption , at mount time , in building free NIDs, f2fs will
1. first scan NAT (scan_nat_page), found X is used
2. then scan NAT journal (scan_curseg_cache), found X is free , add it to free NIDs , BUT does not update free_nid_bitmap!
as an comparison , when NAT cache of X is flushed , the flushing code path will update free_nid_bitmap.
Last edited by lolo123; 07-16-2022 at 11:01 PM.
|