mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Milan Broz <gmazyland@gmail.com>
Cc: Shukai Ni <shukai.ni@kuleuven.be>,
	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: Mon, 3 Aug 2026 17:51:55 +0200 (CEST)	[thread overview]
Message-ID: <4f5d02ce-5861-6d72-83ae-70018e63b6d3@redhat.com> (raw)
In-Reply-To: <2d413e76-2709-4d11-8bd8-b34bb7465368@gmail.com>



On Fri, 31 Jul 2026, Milan Broz wrote:

> 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

OK.

I updated the patch at the top of the linux-dm repository, so that keyed 
discard can be set, but not disabled.

Mikulas


  reply	other threads:[~2026-08-03 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 14:33 [PATCH v2 0/1] " 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
2026-08-03 15:51       ` Mikulas Patocka [this message]
     [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=4f5d02ce-5861-6d72-83ae-70018e63b6d3@redhat.com \
    --to=mpatocka@redhat.com \
    --cc=agk@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=gmazyland@gmail.com \
    --cc=jo.vanbulck@cs.kuleuven.be \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®