[dm-crypt] Re: regression: data corruption with ext4 on LUKS on nvme with torvalds master
Bart Van Assche <[email protected]> Thu, 13 May 2021 14:18:14 -0700
| Newsgroups | de.saout.dm-crypt,dev.linux.lists.dm-devel,org.infradead.lists.linux-nvme,org.kernel.vger.linux-block,org.kernel.vger.linux-ext4,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 5/13/21 12:22 PM, Mikulas Patocka wrote:
> We already had problems with too large bios in dm-crypt and we fixed it by
> adding this piece of code:
>
> /*
> * Check if bio is too large, split as needed.
> */
> if (unlikely(bio->bi_iter.bi_size > (BIO_MAX_VECS << PAGE_SHIFT)) &&
> (bio_data_dir(bio) == WRITE || cc->on_disk_tag_size))
> dm_accept_partial_bio(bio, ((BIO_MAX_VECS << PAGE_SHIFT) >> SECTOR_SHIFT));
>
> It will ask the device mapper to split the bio if it is too large. So,
> crypt_alloc_buffer can't receive a bio that is larger than BIO_MAX_VECS <<
> PAGE_SHIFT.
Hi Mikulas,
Are you perhaps referring to commit 4e870e948fba ("dm crypt: fix error
with too large bios")? Did that commit go upstream before multi-page
bvec support? Can larger bios be supported in case of two or more
contiguous pages now that multi-page bvec support is upstream?
Thanks,
Bart.
_______________________________________________
dm-crypt mailing list -- [email protected]
To unsubscribe send an email to [email protected]