bcachefs: Some compression improvements
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 6 May 2020 19:37:04 +0000 (15:37 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:39 +0000 (17:08 -0400)
commitc4dd7871ef71a7327b6b3834e2cdf6777e03eb0a
tree83cb54e1ddcff8451bafabe6c72d584e8a3570d0
parentbc970cecd86d5a77f58e3be017fd80276e71677e
bcachefs: Some compression improvements

In __bio_map_or_bounce(), the check for if the bio is physically
contiguous is improved; it's now more readable and handles multi page
but contiguous bios.

Also when decompressing, we were doing a redundant memcpy in the case
where we were able to use vmap to map a bio contigiously.

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