]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm crypt: use per-bio data
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 28 Mar 2014 19:51:55 +0000 (15:51 -0400)
committerMike Snitzer <snitzer@redhat.com>
Wed, 28 May 2014 18:07:34 +0000 (14:07 -0400)
commit4643d0c75704f142d70ac6ebe7500559dff51989
tree35c5a8336ab39acda82347b0a226667e30689e0c
parent39146b2dad83f8820818428f35cb89280bdb685c
dm crypt: use per-bio data

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: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-crypt.c