• Tikhomirov Pavel's avatar
    v2 deduplication: bunch neighbour data to punch together · 32a48b67
    Tikhomirov Pavel authored
    when decide that data is no longer needed, there are two cases:
    -if data neighbours previous block of "no needed" data, extend bunch
    block(it holds begining and size of concequent "no needed" data) by
    length of curent block and go next.
    -if data not neighbours bunch block(or bunch block size will be bigger
    than MAX_BUNCH_SIZE), than we punch bunch block and set bunch block
    to curent block.
    
    in the end make cleanup to punch last bunch block.
    
    changes in v1:
    punch_hole takes whole page_read
    make restriction more precise
    Signed-off-by: 's avatarTikhomirov Pavel <snorcht@gmail.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    32a48b67
page-read.c 5.06 KB