f2fs: refactor resize_fs to avoid meta updates in progress
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 31 Mar 2020 18:43:07 +0000 (11:43 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 May 2020 03:37:13 +0000 (20:37 -0700)
commitb4b10061ef98c583bcf82a4200703fbaa98c18dc
tree90c1ba24406695843081ce4400b1a26c92d1a615
parent4fec3fc026717f81e34fca59937b0acbfb05642d
f2fs: refactor resize_fs to avoid meta updates in progress

Sahitya raised an issue:
- prevent meta updates while checkpoint is in progress

allocate_segment_for_resize() can cause metapage updates if
it requires to change the current node/data segments for resizing.
Stop these meta updates when there is a checkpoint already
in progress to prevent inconsistent CP data.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c
fs/f2fs/super.c
include/trace/events/f2fs.h