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

Mikulas Patocka mpatocka at redhat.com
Tue Jul 3 18:24:25 UTC 2018



On Tue, 3 Jul 2018, Milan Broz wrote:

> On 07/03/2018 03:21 PM, Mike Snitzer wrote:
> >>
> >> 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.
> > 
> > Yes, option 3.  But you could even error out on table load; though that
> > may be too unforgiving.. reality is userspace needs to account for
> > staying in recalculating mode until it is complete.
> 
> I do not think table load error is the way to go.
> 
> Can we activate dmintegrity read-only (for example with read-only backend device)
> that is not yet fully recalculated?

There's no read-only activation because the journal must be replayed. Most 
journaled filesystems also don't provide read-only activation because they 
need to replay the journal.

> This can needed in some recovery scenarios... (But her we can use recovery mode).
> 
> > But to do that they'd need to monitor (similar to how snapshot-merge
> > polls progress?)
> 
> For veritysetup I will just add this to "status" command output.

I added a field to the status that show the recalculate position. If 
recalculating was never activated, it is "-".

> Milan

Mikulas




More information about the dm-devel mailing list