diff options
| author | Chao Yu <yuchao0@huawei.com> | 2018-02-27 22:45:24 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-04-08 03:51:07 -0700 |
| commit | 58edcdbca67ab09ef7631e7a94a5bd5190895631 (patch) | |
| tree | 0c58a0e84a4878b9c1ee158c0ca9646fbcba1b70 /tools/perf/scripts/python | |
| parent | 1e0aeb0af9ed3b16b4c2543aa2c6502a153b897b (diff) | |
f2fs: fix to avoid race in between atomic write and background GC
Sqlite user Background GC
- move_data_block
: move page #1
- f2fs_is_atomic_file
- f2fs_ioc_start_atomic_write
- f2fs_ioc_commit_atomic_write
- commit_inmem_pages
: commit page #1 & set node #2 dirty
- f2fs_submit_page_write
- f2fs_update_data_blkaddr
- set_page_dirty
: set node #2 dirty
- f2fs_do_sync_file
- fsync_node_pages
: commit node #1 & node #2, then sudden power-cut
In a race case, we may check FI_ATOMIC_FILE flag before starting atomic
write flow, then we will commit meta data before data with reversed
order, after a sudden pow-cut, database transaction will be inconsistent.
So we'd better to exclude gc/atomic_write to each other by using lock
instead of flag checking.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
