]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: give priority to select unpinned section for foreground GC
authorChao Yu <chao@kernel.org>
Fri, 6 May 2022 10:30:31 +0000 (18:30 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 6 May 2022 21:26:33 +0000 (14:26 -0700)
commit76a6edf34dd191c0f500e807434f857da4768668
tree1c98cc9d1aa6447472d0f9eaa72237fccdb44a27
parentfc641ef12133d1b52916207ff8d8409813605987
f2fs: give priority to select unpinned section for foreground GC

Previously, during foreground GC, if victims contain data of pinned file,
it will fail migration of the data, and meanwhile i_gc_failures of that
pinned file may increase, and when it exceeds threshold, GC will unpin
the file, result in breaking pinfile's semantics.

In order to mitigate such condition, let's record and skip section which
has pinned file's data and give priority to select unpinned one.

Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c
fs/f2fs/segment.c
fs/f2fs/segment.h