dm integrity: implement synchronous mode for reboot handling
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 29 Apr 2019 12:57:26 +0000 (14:57 +0200)
committerMike Snitzer <snitzer@redhat.com>
Wed, 8 May 2019 17:41:59 +0000 (13:41 -0400)
commit482714932ecee063884b5d0ceddadbfafe89ae2b
tree68c6107c28ef2dcca17b640206251049ec0e8e07
parent1f5a77591b13a302b60db0dcda57940f3e5d5214
dm integrity: implement synchronous mode for reboot handling

Unfortunatelly, there may be bios coming even after the reboot notifier
was called.  We don't want these bios to make the bitmap dirty again.

To address this, implement a synchronous mode - when a bio is about to
be terminated, we clean the bitmap and terminate the bio after the clean
operation succeeds.  This obviously slows down bio processing, but it
makes sure that when all bios are finished, the bitmap will be clean.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-integrity.c