]> git.baikalelectronics.ru Git - kernel.git/commit
dm integrity: support larger block sizes
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 18 Apr 2017 20:51:52 +0000 (16:51 -0400)
committerMike Snitzer <snitzer@redhat.com>
Mon, 24 Apr 2017 16:04:33 +0000 (12:04 -0400)
commit310db51f1a2831b1bb7a10db48e782246737ea34
tree25610e72c2f7eff159c44c6afc8a88d080ee7447
parenta0894e3208331dbff3311290c34b7628d52752c7
dm integrity: support larger block sizes

The DM integrity block size can now be 512, 1k, 2k or 4k.  Using larger
blocks reduces metadata handling overhead.  The block size can be
configured at table load time using the "block_size:<value>" option;
where <value> is expressed in bytes (defult is still 512 bytes).

It is safe to use larger block sizes with DM integrity, because the
DM integrity journal makes sure that the whole block is updated
atomically even if the underlying device doesn't support atomic writes
of that size (e.g. 4k block ontop of a 512b device).

Depends-on: a37698cf ("block: fix blk_integrity_register to use template's interval_exp if not 0")
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