• Yunlong Song's avatar
    Revert "f2fs: node segment is prior to data segment selected victim" · 91f4382b
    Yunlong Song authored
    This reverts commit b9cd2061.
    
    That patch causes much fewer node segments (which can be used for SSR)
    than before, and in the corner case (e.g. create and delete *.txt files in
    one same directory, there will be very few node segments but many data
    segments), if the reserved free segments are all used up during gc, then
    the write_checkpoint can still flush dentry pages to data ssr segments,
    but will probably fail to flush node pages to node ssr segments, since
    there are not enough node ssr segments left (the left ones are all
    full).
    
    So revert this patch to give a fair chance to let node segments remain
    for SSR, which provides more robustness for corner cases.
    
    Conflicts:
    	fs/f2fs/gc.c
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    91f4382b
gc.c 26.7 KB