• Mikulas Patocka's avatar
    dm crypt: use per-bio data · 298a9fa0
    Mikulas Patocka authored
    Change dm-crypt so that it uses auxiliary data allocated with the bio.
    
    Dm-crypt requires two allocations per request - struct dm_crypt_io and
    struct ablkcipher_request (with other data appended to it).  It
    previously only used mempool allocations.
    
    Some requests may require more dm_crypt_ios and ablkcipher_requests,
    however most requests need just one of each of these two structures to
    complete.
    
    This patch changes it so that the first dm_crypt_io and ablkcipher_request
    are allocated with the bio (using target per_bio_data_size option).  If
    the request needs additional values, they are allocated from the mempool.
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    298a9fa0
dm-crypt.c 47.3 KB