diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2018-04-19 08:33:00 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2018-04-30 11:51:39 -0400 |
commit | f7879b4cea4b7867e7382efdbd805fbe35835337 (patch) | |
tree | bb6b18ca48bde0f32f82b38ed28e8126f24ae755 /virt | |
parent | fc8cec113904a47396bf0a1afc62920d66319d36 (diff) | |
download | linux-f7879b4cea4b7867e7382efdbd805fbe35835337.tar.bz2 |
dm bufio: fix buffer alignment
Commit 6b5e718cc138 ("dm bufio: relax alignment constraint on slab
cache") relaxed alignment on dm-bufio cache, however it may break
dm-crypt or dm-integrity.
dm-crypt and dm-integrity require that the size of bio vector entries
(bv_len) is aligned on its sector size. bv_offset doesn't have to be
aligned, but bv_len must be. XFS sends unaligned bios, but they do not
cross page boundary, so the requirement for aligned bv_len is met.
Commit 6b5e718cc138 made dm-bufio send unaligned bios that cross page
boundary, this could break dm-crypt and dm-integrity.
Reinstates the alignment. Note that misaligned entries only happen when
we use slab/slub debugging. Without debugging, the entries are always
aligned.
Fixes: 6b5e718cc138 ("dm bufio: relax alignment constraint on slab cache")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions