Skip to content
  • Fan Li's avatar
    f2fs: add new interfaces for extent tree · 0f825ee6
    Fan Li authored
    
    
    Add a lookup and a insertion interface for extent tree.
    The new lookup return the insert position and the prev/next
    extents closest to the offset we lookup when find no match.
    The new insertion uses above parameters to improve performance.
    
    There are three possible insertions after the lookup in
    f2fs_update_extent_tree, two of them insert parts of removed extent
    back to tree, since no merge happens during this process, new insertion
    skips the merge check in this scanario; the another insertion inserts a
    new extent to tree, new insertion uses prev/next extent and insert
    position to insert this extent directly, and save the time of searching
    down the tree.
    
    As long as tree remains unchanged between lookup and insertion, this
    would work fine. And the new lookup would be useful when add
    multi-blocks extent support for insertion interface.
    
    Signed-off-by: default avatarFan li <fanofcode.li@samsung.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    0f825ee6