Cryptsetup development
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>,
	cryptsetup@lists.linux.dev
Subject: Re: luks2 + integrity + discard
Date: Mon, 20 Jul 2026 22:28:27 +0200	[thread overview]
Message-ID: <1ddcf551-ae22-4677-9910-37aee6895422@gmail.com> (raw)
In-Reply-To: <al4RjyA894rnZxAK@lazy.lzy>

On 7/20/26 2:16 PM, Piergiorgio Sartor wrote:
> Hello,
> 
> I'm quite puzzled about the, apparently,
> missing support of discard (or trim) in
> case of encryption with integrity.
> 
>  From what I understand, which might be
> very wrong, both the encryption layer
> and dm-integrity should support discard.
> 
> Reading the documentation does not really,
> at least for me, clarify what is the
> reason why it should not be possible to
> have encryption + integrity + discard.
> 
> On the other hand, in case of integrity
> under the raid, with lvm and luks2 on
> top, it seems possible to have discard.
> 
> Can someone provide some clarification
> on this?

Discard (TRIM) is supported for dm-integrity
standalone mode. It is also supported for dm-crypt
standalone.

It is not supported for stacked dm-crypt over dm-integrity
(In authenticated encryption mode where dm-integrity only provides
interleaved metadata sectors for dm-crypt.)
(And it never will be implemented for this case.)

Milan


  reply	other threads:[~2026-07-20 20:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 12:16 luks2 + integrity + discard Piergiorgio Sartor
2026-07-20 20:28 ` Milan Broz [this message]
2026-07-20 20:36   ` Piergiorgio Sartor
2026-07-20 21:03     ` 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=1ddcf551-ae22-4677-9910-37aee6895422@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=cryptsetup@lists.linux.dev \
    --cc=piergiorgio.sartor@nexgo.de \
    /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