• Chao Yu's avatar
    f2fs: avoid unneeded loop in build_sit_entries · d600af23
    Chao Yu authored
    When building each sit entry in cache, firstly, we will load it from
    sit page, and then check all entries in sit journal, if there is one
    updated entry in journal, cover cached entry with the journaled one.
    
    Actually, most of check operation is unneeded since we only need
    to update cached entries with journaled entries in batch, so
    changing the flow as below for more efficient:
    1. load all sit entries into cache from sit pages;
    2. update sit entries with journal.
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    d600af23
segment.c 66.7 KB