From: Milan Broz <gmazyland@gmail.com>
To: Mikulas Patocka <mpatocka@redhat.com>, Shukai Ni <shukai.ni@kuleuven.be>
Cc: agk@redhat.com, snitzer@kernel.org, bmarzins@redhat.com,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Subject: Re: [PATCH v2 1/1] dm-integrity: replace forgeable discard filler with a keyed sector marker
Date: Fri, 31 Jul 2026 23:03:22 +0200 [thread overview]
Message-ID: <2d413e76-2709-4d11-8bd8-b34bb7465368@gmail.com> (raw)
In-Reply-To: <5a838e63-f772-7ef9-ab45-8bc2c1ccae87@redhat.com>
On 7/30/26 5:29 PM, Mikulas Patocka wrote:
> Hi
>
> I accepted the patch (and made some small modifications to it).
Mikulas, you added this part to constructor:
+ if (!!(ic->sb->flags & cpu_to_le32(SB_FLAG_DISCARD_KEYED)) != ic->discard_keyed) {
+ r = -EINVAL;
+ ti->error = "Mismatch in the discard_keyed flag";
+ goto bad;
+ }
Unfortunately, this is not going to work.
In integritysetup, allowing discard is an active flag, not a format flag.
It should be ok to activate discard later, but this check blocks it.
It should also allow to activate the device without discard (even if it
was activated before with it).
IMO, it should upgrade the superblock if allow_discards_keyed is set
on activation (and then do not allow it to revert back).
With the current approach, I cannot add this option to integritysetup.
We just have no way to send allow_discard in format action (as it is
an activation flag only in our API).
Milan
next prev parent reply other threads:[~2026-07-31 21:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 14:33 [PATCH v2 0/1] dm-integrity: replace forgeable discard filler with a keyed sector marker Shukai Ni
2026-07-28 14:33 ` [PATCH v2 1/1] " Shukai Ni
2026-07-30 15:29 ` Mikulas Patocka
2026-07-31 21:03 ` Milan Broz [this message]
2026-08-03 15:51 ` Mikulas Patocka
[not found] ` <AS8PR08MB8996C972D432810063500AAFE8DE2@AS8PR08MB8996.eurprd08.prod.outlook.com>
2026-08-10 13:30 ` Milan Broz
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=2d413e76-2709-4d11-8bd8-b34bb7465368@gmail.com \
--to=gmazyland@gmail.com \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=jo.vanbulck@cs.kuleuven.be \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=shukai.ni@kuleuven.be \
--cc=snitzer@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox