If last_zone((total_zones >> 2)) is equal or less than
next_zone(CURSEG_COLD_NODE), cold data area will be located in the
same position with hot data, fixes it.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
c.cur_seg[CURSEG_HOT_DATA] = next_zone(CURSEG_COLD_NODE);
c.cur_seg[CURSEG_COLD_DATA] =
max(last_zone((total_zones >> 2)),
- next_zone(CURSEG_COLD_NODE));
+ next_zone(CURSEG_HOT_DATA));
c.cur_seg[CURSEG_WARM_DATA] =
max(last_zone((total_zones >> 1)),
next_zone(CURSEG_COLD_DATA));