From: Milan Broz <gmazyland@gmail.com>
To: Askar Safin <safinaskar@gmail.com>,
linux-mm@kvack.org, linux-pm@vger.kernel.org,
linux-block@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-lvm@lists.linux.dev, lvm-devel@lists.linux.dev,
linux-raid@vger.kernel.org,
DellClientKernel <Dell.Client.Kernel@dell.com>,
dm-devel@lists.linux.dev, linux-btrfs@vger.kernel.org
Cc: "Nhat Pham" <nphamcs@gmail.com>, "Kairui Song" <ryncsn@gmail.com>,
"Pavel Machek" <pavel@ucw.cz>,
"Rodolfo García Peñas (kix)" <kix@kix.es>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Eric Biggers" <ebiggers@kernel.org>,
"Lennart Poettering" <mzxreary@0pointer.de>,
"Christian Brauner" <brauner@kernel.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: dm bug: hibernate to swap located on dm-integrity doesn't work (how to get data redundancy for swap?)
Date: Thu, 23 Oct 2025 22:42:07 +0200 [thread overview]
Message-ID: <a48a37e3-2c22-44fb-97a4-0e57dc20421a@gmail.com> (raw)
In-Reply-To: <20251023112920.133897-1-safinaskar@gmail.com>
Hi,
I am not sure why you cc so many people, most of lists are not relevant here.
Anyway, could you please test one thing below so the problem is better isolated?
On 10/23/25 1:29 PM, Askar Safin wrote:
...
> Also I tried to add "--integrity-no-journal" to "format" and "open".
> It didn't work, either. (I don't remember what exactly didn't work.
> I can do this experiment again, if needed.)
Are you sure you used --integrity-no-journal both in activation before
hibernation and also in resume? If not, please try it.
This flag activates direct mode and and completely avoids dm-integrity journal.
You can verify it with "integritysetup status <device>" - it should say "journal: not active".
And if it does not work, could you try to use -integrity-recovery-mode the same
way (both before hibernation and later in resume)? This will effectively ignore checksums
providing no protection, but keeping dm-integrity device still in place.
You can verify it with "integritysetup status <device>" - it should say "mode: read/write recovery".
Is the problem still in place with this setting?
You can also try to decrease journal commit time with --journal-commit-time option,
but this is not a real solution.
...>
> Then I tried to do "cryptsetup" instead of "integritysetup". I created
> swap partition so:
>
> cryptsetup luksFormat --type luks2 /dev/disk/by-partuuid/c4bbc73d-7909-42ea-8d96-eab82512cbe7 /tmp/key
> cryptsetup open --type luks2 --key-file /tmp/key /dev/disk/by-partuuid/c4bbc73d-7909-42ea-8d96-eab82512cbe7 swap
> mkswap /dev/mapper/swap
> swapon /dev/mapper/swap
>
> And, of course, I did all necessary edits to initramfs.
>
> And this time everything worked. This proves that I didn't do any mistakes in my setup
> (i. e. I got initramfs right, etc), and this is actual bug in dm-integrity.
>
> Unfortunately, LUKS created such way doesn't have any redundancy. So this is not solution for me.
Redundancy? You mean data integrity protection? There is no redundancy, only additional authentication tag
(detecting integrity error but not correcting it).
Thanks,
Milan
next prev parent reply other threads:[~2025-10-23 20:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 11:29 dm bug: hibernate to swap located on dm-integrity doesn't work (how to get data redundancy for swap?) Askar Safin
2025-10-23 20:42 ` Milan Broz [this message]
2025-10-24 16:31 ` Askar Safin
2025-10-24 17:50 ` Milan Broz
2025-10-25 5:26 ` Askar Safin
2025-10-27 8:08 ` Askar Safin
[not found] ` <4cd2d217-f97d-4923-b852-4f8746456704@mazyland.cz>
2025-10-24 10:23 ` [PATCH] pm-hibernate: flush block device cache when hibernating Mikulas Patocka
2025-10-27 8:42 ` Askar Safin
2025-10-31 19:29 ` Mikulas Patocka
2025-10-31 19:33 ` [PATCH 1/2] pm-hibernate: flush disk cache when suspending Mikulas Patocka
2025-11-03 15:53 ` Askar Safin
2025-10-31 19:35 ` [RFC PATCH 2/2] swsusp: make it possible to hibernate to device mapper devices Mikulas Patocka
2025-10-29 13:31 ` [PATCH] pm-hibernate: flush block device cache when hibernating Rafael J. Wysocki
2025-10-29 14:38 ` Christoph Hellwig
2025-10-29 16:31 ` 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=a48a37e3-2c22-44fb-97a4-0e57dc20421a@gmail.com \
--to=gmazyland@gmail.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=brauner@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=ebiggers@kernel.org \
--cc=kix@kix.es \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-lvm@lists.linux.dev \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=lvm-devel@lists.linux.dev \
--cc=mzxreary@0pointer.de \
--cc=nphamcs@gmail.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=ryncsn@gmail.com \
--cc=safinaskar@gmail.com \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).