Skip to content

Commit

Permalink
dm integrity: support larger block sizes
Browse files Browse the repository at this point in the history
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: 2859323 ("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>
  • Loading branch information
Mikulas Patocka authored and Mike Snitzer committed Apr 24, 2017
1 parent 56b67a4 commit 9d609f8
Show file tree
Hide file tree
Showing 2 changed files with 179 additions and 45 deletions.
5 changes: 5 additions & 0 deletions Documentation/device-mapper/dm-integrity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ journal_mac:algorithm(:key) (the key is optional)
the journal. Thus, modified sector number would be detected at
this stage.

block_size:number
The size of a data block in bytes. The larger the block size the
less overhead there is for per-block integrity metadata.
Supported values are 512, 1024, 2048 and 4096 bytes. If not
specified the default block size is 512 bytes.

The journal mode (D/J), buffer_sectors, journal_watermark, commit_time can
be changed when reloading the target (load an inactive table and swap the
Expand Down
Loading

0 comments on commit 9d609f8

Please sign in to comment.