]> git.ipfire.org Git - people/ms/linux.git/commit - fs/f2fs/gc.c
f2fs: avoid race in between GC and block exchange
authorChao Yu <yuchao0@huawei.com>
Fri, 3 Nov 2017 02:21:05 +0000 (10:21 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 6 Nov 2017 00:42:10 +0000 (16:42 -0800)
commitbb06664a534ba4833373f19ae018efff91ab2908
tree5c8ff095ec9ebae04cad4fcf440eb6ca90caa2f1
parentf6986ede80c9a03babb1cff870964f4de1e763e8
f2fs: avoid race in between GC and block exchange

During block exchange in {insert,collapse,move}_range, page-block mapping
is unstable due to mapping moving or recovery, so there should be no
concurrent cache read operation rely on such mapping, nor cache write
operation to mess up block exchange.

So this patch let background GC be aware of that.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
fs/f2fs/gc.c