]> git.baikalelectronics.ru Git - kernel.git/commit
dm dust: use dust block size for badblocklist index
authorBryan Gurney <bgurney@redhat.com>
Fri, 16 Aug 2019 14:09:53 +0000 (10:09 -0400)
committerMike Snitzer <snitzer@redhat.com>
Wed, 21 Aug 2019 15:27:17 +0000 (11:27 -0400)
commit44ff5d722c075062bcec7afa3702c8d3f5b4d1d9
tree8ad8a097d54d8745bbe60b95798194120a703853
parente4565ac7b2781a8e5d7fde6a1561557f209fed73
dm dust: use dust block size for badblocklist index

Change the "frontend" dust_remove_block, dust_add_block, and
dust_query_block functions to store the "dust block number", instead
of the sector number corresponding to the "dust block number".

For the "backend" functions dust_map_read and dust_map_write,
right-shift by sect_per_block_shift.  This fixes the inability to
emulate failure beyond the first sector of each "dust block" (for
devices with a "dust block size" larger than 512 bytes).

Fixes: d9a78590412066e ("dm: add dust target")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan Gurney <bgurney@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-dust.c