dm-integrity: estimate the size needed for separate integrity device

Max Gautier <[email protected]> Mon, 1 Jun 2026 09:50:19 +0200
Newsgroups dev.linux.lists.cryptsetup
Message-ID <ah05u91w9wfghC8_@framework>
Hello,

I'm building a media server where I intend to use RAID10 on top of
dm-integrity (and cryptsetup on top of that, but that's not really
relevant, AFAIK). I plan to put the integrity tags of dm-integrity on my
NVME, to avoid some of the performance penalty. 

But I'm not sure what size each "integrity tags" partition should be,
depending on the data device.

I'm using this blog [1] as the base for the calculation, but I couldn't
find a reference for the calculation in the dm-integrity kernel
documentation, in cryptsetup wiki or in the integritysetup man page.

Is there a reference for calculating that size ? I'm fine looking at
some code, and it looks like the dm-integrity source[2] has some functions names
which could be helpful, but any pointers would help :)

Thanks !

[1]: https://blog.tty8.org/posts/2025-04-02-moving-dm-integrity-tags-off-the-hdd-to-speed-up-raid.html
[2]: https://codebrowser.dev/linux/linux/drivers/md/dm-integrity.c.html

-- 
Max Gautier