On Oct 02, 2019 / 14:30, Shin'ichiro Kawasaki wrote:
> Now I'm preparing patches for fsck as well as kernel based on the valuable
> and detailed e-mail discussion between you and me. Here I summarize my

I have posted the two patch series to add write pointer consistency check,
based on the discussion on the list: one series for fsck (v5), the other for
kernel f2fs module. Review will be appreciated.

> take-aways through the discussion.
> 
> ---- F2FS write pointer consistency check and fix by fsck and kernel ----
> 
> A) Check write pointer consistency for open zones and non-open zones
> 
> A-1) For open zones (cursegs point to), check consistency between the cursegs
>      in CP and the write pointers. If the curseg is inconsistent with the 
> write
>      pointer in the zone that curseg points to, keep the write pointer as is
>      and set new zone(=section) to the curseg.
> 
> A-2) For non-open zones (cursegs do not point to), check consistency between
>      SIT valid blocks bitmap and the write pointers.
>      A-2-i) if the zone does not have valid blocks and fsync data, reset the
>             write pointer.
>      A-2-ii) if the last valid block recorded in SIT valid blocks bit map is
>              beyond the write pointer, just report the inconsistency to notice
>            kernel bug. No fix is available for this error.
> 
> B-1) Implement A-1) check & fix feature in the kernel. Fsync data beyond
>      curseg's next_blkoff should be kept until fsync data recovery completion.
>      Fix write pointer consistency just before the check point trigger for 
> fsync
>      data recovery.
> 
> B-2) Implement A-2) check feature in the kernel to avoid unaligned write error
>      to the zone. Do not implement fix feature in the kernel to avoid the risk
>      of SIT break. Just check and if check fails, ask users to run fsck.
> 
> C-1) Implement A-1) check & fix feature in fsck. Do check and fix twice, at 
> the
>      beginning of the fsck to avoid write error during fsck and at the end of
>      fsck to ensure consistency with updates by fsck.
>      In case fsync data is left after the curseg position, do not fix the
>      inconsistency by fsck. Leave it so that kernel can recover it later.
> 
> C-2) Add check fix feature A-2) to fsck. Do check and fix twice in same manner
>      as C-1).
> 
> --------------------------------------------------------------------------
> 
> Once the patches get ready, your review will be appreciated. Thanks!

--
Best Regards,
Shin'ichiro Kawasaki

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to