Skip to content
  • Bryan Gurney's avatar
    dm dust: use dust block size for badblocklist index · 08c04c84
    Bryan Gurney authored
    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: e4f3fabd
    
     ("dm: add dust target")
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarBryan Gurney <bgurney@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    08c04c84