bcachefs: Handle bio_iov_iter_get_pages() returning unaligned bio
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 22 Sep 2019 19:02:05 +0000 (15:02 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:27 +0000 (17:08 -0400)
commit0a426c323927d647f6c31d063ee2f1abbe53db80
treef91b42f0d302c9f872411bc0f25058604a73888f
parentec350b90d73b7b8ead9f377c58efe04b12f6ba6e
bcachefs: Handle bio_iov_iter_get_pages() returning unaligned bio

If the user buffer isn't aligned to the filesystem block size, on a
large enough IO - where it won't fit into a single bio -
bio_iov_iter_get_pages() won't necessarily return a bio with the proper
alignment.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c