]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix to stop filesystem update once CP failed
authorChao Yu <chao@kernel.org>
Wed, 4 Aug 2021 00:38:38 +0000 (08:38 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 4 Aug 2021 01:08:29 +0000 (18:08 -0700)
commitdd6b4bd9562c4bfe5e86f8758418eba2dca6a5dc
treeed33190a7844c8500801b20f992227dc39380ca7
parentf77fa4c7a5b9227957c12ef260a4bb5ad9b48288
f2fs: fix to stop filesystem update once CP failed

During f2fs_write_checkpoint(), once we failed in
f2fs_flush_nat_entries() or do_checkpoint(), metadata of filesystem
such as prefree bitmap, nat/sit version bitmap won't be recovered,
it may cause f2fs image to be inconsistent, let's just set CP error
flag to avoid further updates until we figure out a scheme to rollback
all metadatas in such condition.

Reported-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c