Skip to content
  • Chao Yu's avatar
    f2fs: do in batches truncation in truncate_hole · ea58711e
    Chao Yu authored
    
    
    truncate_data_blocks_range can do in batches truncation which makes all
    changes in dnode page content, dnode page status, extent cache, block
    count updating together.
    
    But previously, truncate_hole() always truncates one block in dnode page
    at a time by invoking truncate_data_blocks_range(,1), which make thing
    slow.
    
    This patch changes truncate_hole() to do in batches truncation for all
    target blocks in one direct node inside truncate_data_blocks_range, which
    can make our punch hole operation in ->fallocate more efficent.
    
    Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    ea58711e