• Goldwyn Rodrigues's avatar
    btrfs: use iosize while reading compressed pages · 949b3273
    Goldwyn Rodrigues authored
    
    
    While using compression, a submitted bio is mapped with a compressed bio
    which performs the read from disk, decompresses and returns uncompressed
    data to original bio. The original bio must reflect the uncompressed
    size (iosize) of the I/O to be performed, or else the page just gets the
    decompressed I/O length of data (disk_io_size). The compressed bio
    checks the extent map and gets the correct length while performing the
    I/O from disk.
    
    This came up in subpage work when only compressed length of the original
    bio was filled in the page. This worked correctly for pagesize ==
    sectorsize because both compressed and uncompressed data are at pagesize
    boundaries, and would end up filling the requested page.
    Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    949b3273
extent_io.c 157 KB