diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-10-18 19:06:40 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-11-07 19:40:59 +0100 |
commit | f5a53edcf01eae21dc3ef1845515229e8459e5cc (patch) | |
tree | bd7e880c73aad8ae2afb9105c226902632399593 /fs/f2fs/segment.h | |
parent | f2fs: avoid kernel panic on corruption test (diff) | |
download | linux-f5a53edcf01eae21dc3ef1845515229e8459e5cc.tar.xz linux-f5a53edcf01eae21dc3ef1845515229e8459e5cc.zip |
f2fs: support aligned pinned file
This patch supports 2MB-aligned pinned file, which can guarantee no GC at all
by allocating fully valid 2MB segment.
Check free segments by has_not_enough_free_secs() with large budget.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 325781a1ae4d..a95467b202ea 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -313,6 +313,8 @@ struct sit_entry_set { */ static inline struct curseg_info *CURSEG_I(struct f2fs_sb_info *sbi, int type) { + if (type == CURSEG_COLD_DATA_PINNED) + type = CURSEG_COLD_DATA; return (struct curseg_info *)(SM_I(sbi)->curseg_array + type); } |