]> git.baikalelectronics.ru Git - kernel.git/commit
dm integrity: add a bitmap mode
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 29 Apr 2019 12:57:24 +0000 (14:57 +0200)
committerMike Snitzer <snitzer@redhat.com>
Wed, 8 May 2019 17:41:58 +0000 (13:41 -0400)
commitf6d6f7653b0dbaa1b7efc431274dc311123d6902
tree607472ff36499f4d1203fd12b74654c7ae7aba76
parentdf0012d929596cf8d3636cb751dc673564b54555
dm integrity: add a bitmap mode

Introduce an alternate mode of operation where dm-integrity uses a
bitmap instead of a journal. If a bit in the bitmap is 1, the
corresponding region's data and integrity tags are not synchronized - if
the machine crashes, the unsynchronized regions will be recalculated.
The bitmap mode is faster than the journal mode, because we don't have
to write the data twice, but it is also less reliable, because if data
corruption happens when the machine crashes, it may not be detected.

Benchmark results for an SSD connected to a SATA300 port, when doing
large linear writes with dd:

buffered I/O:
        raw device throughput - 245MB/s
        dm-integrity with journaling - 120MB/s
        dm-integrity with bitmap - 238MB/s

direct I/O with 1MB block size:
        raw device throughput - 248MB/s
        dm-integrity with journaling - 123MB/s
        dm-integrity with bitmap - 223MB/s

For more info see dm-integrity in Documentation/device-mapper/

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