public inbox for dm-crypt@saout.de
 help / color / mirror / Atom feed
From: Nikolay Kichukov <hijacker@oldum.net>
To: Chris Murphy <lists@colorremedies.com>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] luks2 and discard/trim not working
Date: Sat, 9 May 2020 21:41:59 +0200	[thread overview]
Message-ID: <20200509214159.3d85409c@glena.fritz.box> (raw)
In-Reply-To: <CAJCQCtQAuhh3aLFa7Sze17wmYqUa=JtPDXMiH7KirJE18Powzg@mail.gmail.com>

Hello Chris,

On Sat, 9 May 2020 09:45:13 -0600
Chris Murphy <lists@colorremedies.com> wrote:

> On Sat, May 9, 2020 at 8:28 AM Nikolay Kichukov <hijacker@oldum.net>
> wrote:
> >
> > Hello folks,
> >
> > Recently, I upgraded to LUKS2 on a NVME SSD disk and noticed that
> > fstrim does not work. Surely it was running fine with LUKS1.  
> 
> ...
> 
> > dmsetup table /dev/mapper/root | grep allow
> > 0 947028136 crypt capi:rfc7539(chacha20,poly1305)-random
> > :32:logon:cryptsetup:6ae40ec7-1b4c-40ea-871b-d13c9ae66b92-d0 0
> > 254:0 0 2 allow_discards integrity:28:aead  
> 
> Was the original luksFormat command combined with --integrity option?

yes

> From man cryptsetup: Since dm-integrity doesn't support discards
> (TRIM), dm-crypt device on top of it inherits this, so integrity
> protection mode doesn't support discards either.

Thanks for the direction! It seems like, this is in the pipeline for
dm-integrity, which is to arrive in version 1.6.0 in kernel 5.7:

"allow_discards
Allow block discard requests (a.k.a. TRIM) for the integrity device.
Discards are only allowed to devices using internal hash.
The default is to ignore discard requests.
Available since: 1.6.0 (kernel 5.7)"

source: https://gitlab.com/cryptsetup/cryptsetup/-/wikis/DMIntegrity
 
Does mine use an internal hash?

Thanks,
-Nik

  reply	other threads:[~2020-05-09 19:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09 14:25 [dm-crypt] luks2 and discard/trim not working Nikolay Kichukov
2020-05-09 15:45 ` Chris Murphy
2020-05-09 19:41   ` Nikolay Kichukov [this message]
2020-05-09 20:11     ` Milan Broz
2020-05-10  1:41       ` Chris Murphy
2020-05-09 20:23     ` Chris Murphy
2020-05-09 21:35       ` Nikolay Kichukov
2020-05-09 22:01         ` Milan Broz
  -- strict thread matches above, loose matches on Subject: below --
2020-05-08 21:41 Nikolay Kichukov

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=20200509214159.3d85409c@glena.fritz.box \
    --to=hijacker@oldum.net \
    --cc=dm-crypt@saout.de \
    --cc=lists@colorremedies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox