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
This patch allocates zones to initial logs together, if it's on zoned device. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
316e128fe3
commit
15474db2b3
@ -510,6 +510,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