[dm-devel] [PATCH 9/9] dm-integrity: recalculate checksums

Mikulas Patocka mpatocka at redhat.com
Tue Jul 3 01:07:27 UTC 2018



On Sun, 17 Jun 2018, Milan Broz wrote:

> Hi Mikulas,
> 
> I have some questions for the last dm-integrity recalculation patch (copied below).
> 
> - The "recalculate" dm table attribute is never visible in "dmsetup table",
> it is parsed only on table dm-ioctl input.
> I think if sb flags has SB_FLAG_RECALCULATING, it should appear there.

I'll fix it - I will return the value from the target line.

> - So, SB_FLAG_RECALCULATING bit is persistent and never disappears?
> Is it intentional, that after recalculation is done, it is not cleared?
> (Is it because or later resize recalc the rest of block?)

It is intentional, because someone may extend the device and then, 
recalculating must continue.

> - What about monitoring progress - for now, we can only read superblock
> and parse recalc_sector (not sure if you want this). What about status line option?

I will add the progress counter to the status line.

> - How can I stop/restart recalculation (activate device without it / clear sb flag)?
> Shouldn't this be connected to the presence of "recalculate" flag in mapping table?

Should we even have the possibility to stop recalculating?

If the device was recalculating and we activate it without the 
"recalculate" flag, what should it do? If the user reads data that haven't 
been recalculated yet, we could:
1. return an error
2. ignore the non-recalculated checksum and return data
3. continue with recalculating even if the flag "recalculate" is not present

In my opinion, the option 3 is the best. Option 1 makes the device 
unreliable and option 2 makes the device silently lose the integrity 
protection.

> Thanks,
> Milan

Mikulas




More information about the dm-devel mailing list