]> git.baikalelectronics.ru Git - kernel.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 12:00:23 +0000 (13:00 +0100)
commit6719920ea50b5190325a26e37d6ac607c10473ee
tree9db27b25afdc8b861876da4bb8c0379229beb3e1
parent72fa6cf8ce5900127ea5d14fce63b585d6374fca
dm integrity: fix recalculation when moving from journal mode to bitmap mode

commit f96a8780461fb8024aa47893438a58debbc3a33b 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: e61709328e78 ("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