• Hyunchul Lee's avatar
    f2fs: support passing down write hints to block layer with F2FS policy · f2e703f9
    Hyunchul Lee authored
    Add 'whint_mode=fs-based' mount option. In this mode, F2FS passes
    down write hints with its policy.
    
    * whint_mode=fs-based. F2FS passes down hints with its policy.
    
    User                  F2FS                     Block
    ----                  ----                     -----
                          META                     WRITE_LIFE_MEDIUM;
                          HOT_NODE                 WRITE_LIFE_NOT_SET
                          WARM_NODE                "
                          COLD_NODE                WRITE_LIFE_NONE
    ioctl(COLD)           COLD_DATA                WRITE_LIFE_EXTREME
    extension list        "                        "
    
    -- buffered io
    WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
    WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
    WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_LONG
    WRITE_LIFE_NONE       "                        "
    WRITE_LIFE_MEDIUM     "                        "
    WRITE_LIFE_LONG       "                        "
    
    -- direct io
    WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
    WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
    WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_NOT_SET
    WRITE_LIFE_NONE       "                        WRITE_LIFE_NONE
    WRITE_LIFE_MEDIUM     "                        WRITE_LIFE_MEDIUM
    WRITE_LIFE_LONG       "                        WRITE_LIFE_LONG
    
    Many thanks to Chao Yu and Jaegeuk Kim for comments to
    implement this patch.
    Signed-off-by: default avatarHyunchul Lee <cheol.lee@lge.com>
    Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    f2e703f9
f2fs.h 100 KB