From: Mikulas Patocka <mpatocka@redhat.com>
To: Askar Safin <safinaskar@gmail.com>
Cc: Dell.Client.Kernel@dell.com, agk@redhat.com, brauner@kernel.org,
dm-devel@lists.linux.dev, ebiggers@kernel.org, kix@kix.es,
linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-crypto@vger.kernel.org, linux-lvm@lists.linux.dev,
linux-mm@kvack.org, linux-pm@vger.kernel.org,
linux-raid@vger.kernel.org, lvm-devel@lists.linux.dev,
milan@mazyland.cz, msnitzer@redhat.com, mzxreary@0pointer.de,
nphamcs@gmail.com, pavel@ucw.cz, rafael@kernel.org,
ryncsn@gmail.com, torvalds@linux-foundation.org
Subject: Re: [PATCH 1/2] pm-hibernate: flush disk cache when suspending
Date: Mon, 24 Nov 2025 20:51:16 +0100 (CET) [thread overview]
Message-ID: <4085e0de-30f5-870c-ff82-5a293fe8ac73@redhat.com> (raw)
In-Reply-To: <20251122224748.3724202-1-safinaskar@gmail.com>
On Sun, 23 Nov 2025, Askar Safin wrote:
> Mikulas Patocka <mpatocka@redhat.com>:
> > [PATCH 1/2] pm-hibernate: flush disk cache when suspending
> >
> > There was reported failure that suspend doesn't work with dm-integrity.
> > The reason for the failure is that the suspend code doesn't issue the
> > FLUSH bio - the data still sits in the dm-integrity cache and they are
> > lost when poweroff happens.
>
> I tested this patchset (in Qemu). It works.
>
> Here is script I used for testing:
>
> https://zerobin.net/?66669be7d2404586#xWufhCq7zCoOk3LJcJCj7W4k3vYT3U4vhGutTN3p8m0=
>
> Here are logs:
>
> https://zerobin.net/?5d4a2abbad751890#WMcQl4FAZC9KqcAuJU3TSVr7wuVnPFwI7dlinA9QHOo=
>
> Tested-By: Askar Safin <safinaskar@gmail.com>
>
> There was no any reason to wait for me. You could easily test using script above.
>
> Also: Linux shows this scary message when booting in Qemu:
>
> [ 0.512581] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
>
> So, FUA is not supported? Does it mean that this patch is wrong, and works purely
> by chance?
If FUA is not supported by a disk, the kernel would send a flush request
after the write request with the FUA flag. There's no problem with that -
the cache will be flushed correctly.
Mikulas
> --
> Askar Safin
>
next prev parent reply other threads:[~2025-11-24 19:52 UTC|newest]
Thread overview: 27+ 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
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-11-22 13:51 ` Milan Broz
2025-11-22 20:33 ` Askar Safin
2025-11-22 22:47 ` Askar Safin
2025-11-24 19:51 ` Mikulas Patocka [this message]
2025-10-31 19:35 ` [RFC PATCH 2/2] swsusp: make it possible to hibernate to device mapper devices Mikulas Patocka
2025-11-30 0:56 ` Askar Safin
2025-12-17 23:18 ` Askar Safin
2025-12-22 15:03 ` Milan Broz
2025-12-22 22:24 ` Askar Safin
2025-12-23 1:41 ` Askar Safin
2025-12-23 5:29 ` Askar Safin
2025-12-23 6:33 ` Askar Safin
2026-01-14 7:27 ` Askar Safin
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=4085e0de-30f5-870c-ff82-5a293fe8ac73@redhat.com \
--to=mpatocka@redhat.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=agk@redhat.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=milan@mazyland.cz \
--cc=msnitzer@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.