Skip to content
  • Mike Snitzer's avatar
    dm thin: do not set discard_zeroes_data · 307615a2
    Mike Snitzer authored
    
    
    The dm thin pool target claims to support the zeroing of discarded
    data areas.  This turns out to be incorrect when processing discards
    that do not exactly cover a complete number of blocks, so the target
    must always set discard_zeroes_data_unsupported.
    
    The thin pool target will zero blocks when they are allocated if the
    skip_block_zeroing feature is not specified.  The block layer
    may send a discard that only partly covers a block.  If a thin pool
    block is partially discarded then there is no guarantee that the
    discarded data will get zeroed before it is accessed again.
    Due to this, thin devices cannot claim discards will always zero data.
    
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
    Cc: stable@vger.kernel.org # 3.4+
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    307615a2