Skip to content
  • Milan Broz's avatar
    dm crypt: always disable discard_zeroes_data · 983c7db3
    Milan Broz authored and Alasdair Kergon's avatar Alasdair Kergon committed
    
    
    If optional discard support in dm-crypt is enabled, discards requests
    bypass the crypt queue and blocks of the underlying device are discarded.
    For the read path, discarded blocks are handled the same as normal
    ciphertext blocks, thus decrypted.
    
    So if the underlying device announces discarded regions return zeroes,
    dm-crypt must disable this flag because after decryption there is just
    random noise instead of zeroes.
    
    Signed-off-by: default avatarMilan Broz <mbroz@redhat.com>
    Signed-off-by: Alasdair Kergon's avatarAlasdair G Kergon <agk@redhat.com>
    983c7db3