On 2019/12/9 18:44, Shin'ichiro Kawasaki wrote: > On sudden f2fs shutdown, write pointers of zoned block devices can go > further but f2fs meta data keeps current segments at positions before the > write operations. After remounting the f2fs, this inconsistency causes > write operations not at write pointers and "Unaligned write command" > error is reported. > > To avoid the error, compare current segments with write pointers of open > zones the current segments point to, during mount operation. If the write > pointer position is not aligned with the current segment position, assign > a new zone to the current segment. Also check the newly assigned zone has > write pointer at zone start. If not, reset write pointer of the zone. > > Perform the consistency check during fsync recovery. Not to lose the > fsync data, do the check after fsync data gets restored and before > checkpoint commit which flushes data at current segment positions. Not to > cause conflict with kworker's dirfy data/node flush, do the fix within > SBI_POR_DOING protection. > > Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Reviewed-by: Chao Yu <[email protected]> Thanks, _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
