diff options
author | Chao Yu <chao@kernel.org> | 2022-07-12 23:26:43 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-07-30 20:17:06 -0700 |
commit | 0d5b9d8156396bbe1c982708b38ab9e188c45ec9 (patch) | |
tree | 1382ddb49e198f3c6b0d98d3840b336421939b86 /fs/f2fs/f2fs.h | |
parent | a8634ccf5d626506100bb753327e36e6c6b3df70 (diff) | |
download | linux-stable-0d5b9d8156396bbe1c982708b38ab9e188c45ec9.tar.gz linux-stable-0d5b9d8156396bbe1c982708b38ab9e188c45ec9.tar.bz2 linux-stable-0d5b9d8156396bbe1c982708b38ab9e188c45ec9.zip |
f2fs: invalidate meta pages only for post_read required inode
After commit e3b49ea36802 ("f2fs: invalidate META_MAPPING before
IPU/DIO write"), invalidate_mapping_pages() will be called to
avoid race condition in between IPU/DIO and readahead for GC.
However, readahead flow is only used for post_read required inode,
so this patch adds check condition to avoids unnecessary page cache
invalidating for non-post_read inode.
Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 116d491b346d..d0f428aef34b 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1199,6 +1199,7 @@ struct f2fs_io_info { bool retry; /* need to reallocate block address */ int compr_blocks; /* # of compressed block addresses */ bool encrypted; /* indicate file is encrypted */ + bool post_read; /* require post read */ enum iostat_type io_type; /* io type */ struct writeback_control *io_wbc; /* writeback control */ struct bio **bio; /* bio for ipu */ |