]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm integrity: fix recalculation when moving from journal mode to bitmap mode
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 7 Feb 2020 16:42:30 +0000 (11:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:37 +0000 (07:18 +0100)
commitc2ca60de8cf523d8c51a1b8b231868643e436d21
treeab76d2132bc1456e2a3b8c943fe0ef897a13b1d0
parent95150fc25643099ba8151e3c63f08a564b982491
dm integrity: fix recalculation when moving from journal mode to bitmap mode

commit d5bdf66108419cdb39da361b58ded661c29ff66e upstream.

If we resume a device in bitmap mode and the on-disk format is in journal
mode, we must recalculate anything above ic->sb->recalc_sector. Otherwise,
there would be non-recalculated blocks which would cause I/O errors.

Fixes: 468dfca38b1a ("dm integrity: add a bitmap mode")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-integrity.c