Skip to content
  • Chao Yu's avatar
    f2fs: fix to build free nids from readaheaded nat pages · a6d494b6
    Chao Yu authored
    
    
    When there is no enough free nids in free nid cache, we will try to
    readahead FREE_NID_PAGES:4 nat pages into page cache of meta_inode,
    then, reading nat entries in nat page for adding free nids to free nid
    cache.
    
    But when traversing all nat pages we readaheaded in a circulation,
    our exit condition is not set right, one more nat page will be scanned
    without readaheading, resulting worse read performance.
    
    This patch fixes to read the correct number nat pages to avoid bad
    performance.
    
    Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    a6d494b6