OSDN Git Service

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>
Thu, 16 Nov 2017 06:02:31 +0000 (22:02 -0800)
commit3c8f767e13741c5174909e39f238655c82be1c20
tree4bab1e8e44d50b2a9047e29487ce0d80ea3ce0e1
parent4423778adf0e777147f9c0252f6a4f42cbb91256
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