[dm-devel] [PATCH v2] dm-integrity: if we have discard support, use it when recalculating

Melvin Vermeeren vermeeren at vermwa.re
Tue May 11 18:33:16 UTC 2021


Hi Milan,

On Tuesday, 11 May 2021 19:06:53 CEST Milan Broz wrote:
> Also, I added wiping to integritysetup because some tools (like mkfs)
> actually needef to read unitialized data before creating metadata - so
> without previous wipe it failed. (These are bugs in the tools, obviously: I
> plan to report these  unfortunately it never happened. Dunno if it is still
> the case.)

I can confirm a lot of tools still do this. Even `blkdiscard` probes for 
filesystems as a sanity check before discarding. So in order to efficiently 
initialise SSD without wiping, you need to dd zero to the start and end before 
running blkdiscard, or use --no-wipe with (pre-patch) recalculate.

Also, I did not realise the wiping is fully done from integritysetup 
userspace, this means the statement that this option would be useful as a new 
one is flawed, so then I agree the patch should be reverted.

It would be nice however if integritysetup from userspace has a native feature 
to wipe devices supporting discard with discards instead of writing (zeroes?), 
perhaps in the form of a --wipe-discard flag or similar, but that's for 
another day. :)

Cheers,

-- 
Melvin Vermeeren
Systems engineer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20210511/48b501d3/attachment.sig>


More information about the dm-devel mailing list