On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > When fsck updates one of the current segments, update_curseg_info() is > called specifying a single current segment as its argument. However, > update_curseg_info() calls move_curseg_info() function which updates all > six current segments. Then update_curseg_info() for a single current > segment moves all current segments. > > This excessive current segment move causes an issue when a new zone is > assigned to a current segment because of write pointer inconsistency. > Even when a current segment has write pointer inconsistency, all other > current segments should not be moved because they may have fsync data > at their positions. > > To avoid the excessive current segment move, introduce > move_one_curseg_info() function which does same work as > move_curseg_info() only for a single current segment. Call > move_one_curseg_info() in place of move_curseg_info() from > update_curseg_info().
Good catch! > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawas...@wdc.com> Reviewed-by: Chao Yu <yuch...@huawei.com> Thanks, _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel