]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm integrity: fix flush with external metadata device
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 8 Jan 2021 16:15:56 +0000 (11:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:26:13 +0000 (18:26 +0100)
commit5349b17c3df5d62427ebf931851e8f421fad8a70
treeaab6e554607af87b4396a490adeaf4468a1e9a5f
parentc553300f1453c4bec9b2ba715d327b238963459d
dm integrity: fix flush with external metadata device

[ Upstream commit 9b5948267adc9e689da609eb61cf7ed49cae5fa8 ]

With external metadata device, flush requests are not passed down to the
data device.

Fix this by submitting the flush request in dm_integrity_flush_buffers. In
order to not degrade performance, we overlap the data device flush with
the metadata device flush.

Reported-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-bufio.c
drivers/md/dm-integrity.c
include/linux/dm-bufio.h