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>
Tue, 19 Dec 2017 03:39:09 +0000 (19:39 -0800)
commit793cdb935708dbda3c2ce7ce96ade2c8e94d44c2
tree53ee99e790d49661c259dbd995a83efce83924f2
parent75a69567eefcfb551569edfb5d02b0c2562ed317
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