bio: 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 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 separatedly. This mechanism is used in place of kmalloc, so we need that the allocated slab have the same memory alignment as memory allocated with kmalloc. This patch changes the function bio_find_or_create_slab so that it uses ARCH_KMALLOC_MINALIGN alignment when creating the slab cache. This patch is needed so that dm-crypt can use per-bio data for encryption - the crypto subsystem assumes that these data have the same alignment as kmallocated memory. CRs-fixed: 670391 Change-Id: Ied6b5c5955be9d2272f155dc3bb724ea575deb51 Signed-off-by:Mikulas Patocka <mpatocka@redhat.com> [joonwoop@codeaurora.org: resolve trivial merge conflict] Patch-mainline: dm-devel @ 04/05/14, 14:05 Signed-off-by:
Joonwoo Park <joonwoop@codeaurora.org>
Loading
Please register or sign in to comment