diff options
author | Zhang Qilong <[email protected]> | 2022-10-18 10:45:32 +0800 |
---|---|---|
committer | Jaegeuk Kim <[email protected]> | 2022-10-27 20:25:59 -0700 |
commit | 28fc4e9077ce59ab28c89c20dc6be5154473218f (patch) | |
tree | 6620d57545df4228ead354adec4d2c21864728aa /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 14dc00a0e2dbea4b685ab9723ff511fcfd223c18 (diff) |
f2fs: Fix the race condition of resize flag between resizefs
Because the set/clear SBI_IS_RESIZEFS flag not between any locks,
In the following case:
thread1 thread2
->ioctl(resizefs)
->set RESIZEFS flag ->ioctl(resizefs)
... ->set RESIZEFS flag
->clear RESIZEFS flag
->resizefs stream
# No RESIZEFS flag in the stream
Also before freeze_super, the resizefs not started, we should not set
the SBI_IS_RESIZEFS flag.
So move the set/clear SBI_IS_RESIZEFS flag between the cp_mutex and
gc_lock.
Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress")
Signed-off-by: Zhang Xiaoxu <[email protected]>
Signed-off-by: Zhang Qilong <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions