Data in bios can't be modified in-place, as submitters of writes (e.g.,
filesystems) expect that their data buffers aren't modified. To modify the data
you'd need to allocate a new bio with new pages and submit that instead.
Oh wow thanks! I feel stupid. Just to be sure so that I don't send
'noob' questions like this in the future; could I have found this
anywhere in the documentation? The block layer is a lot to take in and I
don't always find the right stuff online.
What sort of device-mapper target are you trying to implement, anyway? If
you're trying to do encryption, dm-crypt already solves that problem.
It's more of an experiment, using compression!
Thanks!
Cheers, Jasper