diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2014-03-28 15:51:55 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-08-01 12:30:34 -0400 |
commit | 6a2414836154dc22b224c837ad7b862f78d595d1 (patch) | |
tree | 35affb2fa0fa07f9d0639f7e884e00ba2e237faf /crypto/des_generic.c | |
parent | a7ffb6a53391c2690263675f13c79a273301d2b3 (diff) | |
download | op-kernel-dev-6a2414836154dc22b224c837ad7b862f78d595d1.zip op-kernel-dev-6a2414836154dc22b224c837ad7b862f78d595d1.tar.gz |
block: use kmalloc alignment for bio slab
Various subsystems can ask the bio subsystem to create a bio slab cache
with some free space before the bio. This free space can be used for any
purpose. Device mapper uses this per-bio-data feature to place some
target-specific and device-mapper specific data before the bio, so that
the target-specific data doesn't have to be allocated separately.
This per-bio-data mechanism is used in place of kmalloc, so we need the
allocated slab to have the same memory alignment as memory allocated
with kmalloc.
Change bio_find_or_create_slab() so that it uses ARCH_KMALLOC_MINALIGN
alignment when creating the slab cache. This is needed so that dm-crypt
can use per-bio-data for encryption - the crypto subsystem assumes this
data will have the same alignment as kmalloc'ed memory.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'crypto/des_generic.c')
0 files changed, 0 insertions, 0 deletions