mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-26 19:51:32 +00:00
mkfs.f2fs: allocate zones together to avoid random access
commit 15474db2b3
category: bugfix
issue: #I6VAS0
CVE: NA
Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------
This patch allocates zones to initial logs together, if it's on zoned device.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
parent
153382836d
commit
00579ab00a
@ -512,6 +512,13 @@ static int f2fs_prepare_super_block(void)
|
||||
c.cur_seg[CURSEG_HOT_DATA] = prev_zone(CURSEG_COLD_NODE);
|
||||
c.cur_seg[CURSEG_COLD_DATA] = 0;
|
||||
c.cur_seg[CURSEG_WARM_DATA] = next_zone(CURSEG_COLD_DATA);
|
||||
} else if (c.zoned_mode) {
|
||||
c.cur_seg[CURSEG_HOT_NODE] = 0;
|
||||
c.cur_seg[CURSEG_WARM_NODE] = next_zone(CURSEG_HOT_NODE);
|
||||
c.cur_seg[CURSEG_COLD_NODE] = next_zone(CURSEG_WARM_NODE);
|
||||
c.cur_seg[CURSEG_HOT_DATA] = next_zone(CURSEG_COLD_NODE);
|
||||
c.cur_seg[CURSEG_WARM_DATA] = next_zone(CURSEG_HOT_DATA);
|
||||
c.cur_seg[CURSEG_COLD_DATA] = next_zone(CURSEG_WARM_DATA);
|
||||
} else {
|
||||
c.cur_seg[CURSEG_HOT_NODE] = 0;
|
||||
c.cur_seg[CURSEG_WARM_NODE] = next_zone(CURSEG_HOT_NODE);
|
||||
|
Loading…
Reference in New Issue
Block a user