From: Mike Snitzer <snitzer@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>,
Milan Broz <gmazyland@gmail.com>
Subject: Re: [PATCH 9/9] dm-integrity: recalculate checksums
Date: Tue, 3 Jul 2018 09:21:16 -0400 [thread overview]
Message-ID: <20180703132115.GA28076@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1806271046370.17497@file01.intranet.prod.int.rdu2.redhat.com>
On Mon, Jul 02 2018 at 9:07pm -0400,
Mikulas Patocka <mpatocka@redhat.com> wrote:
>
>
> 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.
SO like <completed>/<total> ?
> > - 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.
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.
But to do that they'd need to monitor (similar to how snapshot-merge
polls progress?)
Mike
next prev parent reply other threads:[~2018-07-03 13:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 15:33 [PATCH 9/9] dm-integrity: recalculate checksums Mikulas Patocka
[not found] ` <30799a62-b825-4ce4-7b10-044ce8e030da@redhat.com>
2018-06-17 17:44 ` Milan Broz
2018-07-03 1:07 ` Mikulas Patocka
2018-07-03 13:21 ` Mike Snitzer [this message]
2018-07-03 14:53 ` Milan Broz
2018-07-03 18:24 ` Mikulas Patocka
2018-07-03 18:36 ` Zdenek Kabelac
-- strict thread matches above, loose matches on Subject: below --
2018-07-03 18:13 Mikulas Patocka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180703132115.GA28076@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=gmazyland@gmail.com \
--cc=mpatocka@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.