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

Melvin Vermeeren vermeeren at vermwa.re
Wed May 5 19:27:41 UTC 2021


Hi,

On Wednesday, 5 May 2021 20:48:47 CEST Mikulas Patocka wrote:
> It doesn't matter if the device is discarded or not. If the metadata
> constains the discard filler, dm-integrity won't check the checksum - so
> the data can contain anything.
> 
> ...
>
> The device after discard may contain random pattern (some SSDs really do)
> - so when the metadata contains the discard filler, the data may contain
> anything.

So if an existing SSD is formatted with --no-wipe --data-device option and 
then opened with --integrity-recalculate all metadata will contain the discard 
filler with this patch.

So then, all the current data in the drive is not checked for integrity 
because it contains discard filler. This means that integrity recalculation 
itself never takes place for existing data. Meaning that only newly written 
data to SSD device will actually have integrity protection.

Is this correct?

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/20210505/86765a63/attachment.sig>


More information about the dm-devel mailing list