OSDN Git Service

f2fs: apply write hints to select the type of segments for buffered write
authorHyunchul Lee <cheol.lee@lge.com>
Thu, 9 Nov 2017 05:51:27 +0000 (14:51 +0900)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 16 Nov 2017 06:03:42 +0000 (22:03 -0800)
commit47af6c72d9440c90674d9b79da13ce8922491d24
treea58179ebc9e69c63debd33880017785f1c5306b9
parentac9819160586ff12691558c3a3b07554069a8024
f2fs: apply write hints to select the type of segments for buffered write

Write hints helps F2FS to determine which type of segments would be
selected for buffered write.

This patch implements the mapping from write hints to segment types
as shown below.

  hints               segment type
  -----               ------------
  WRITE_LIFE_SHORT    CURSEG_HOT_DATA
  WRITE_LIFE_EXTREME  CURSEG_COLD_DATA
  others              CURSEG_WARM_DATA

the F2FS poliy for hot/cold seperation has precedence over this hints.
And hints are not applied in in-place update.

Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c