fsck.f2fs: update curseg .next_blkoff/.alloc_type preferential
authorChao Yu <yuchao0@huawei.com>
Thu, 16 May 2019 12:40:43 +0000 (20:40 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 21 May 2019 00:42:52 +0000 (17:42 -0700)
commit54244dcafddcf87355b5515b60ea084ddb47e2d0
tree7496024a7cf9fa82471d3fc0eedcbb28a78504ac
parent9e0a58749de8b62932388cfb645ee6248cd1b413
fsck.f2fs: update curseg .next_blkoff/.alloc_type preferential

If .next_blkoff is inconsistent, we can update curseg .next_blkoff
to first unused block address, and change .alloc_type to SSR
preferential, instead of move curseg to other position.

This can help to repair fuzzed image which has no more free segment.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/fsck.c
fsck/fsck.h
fsck/mount.c