• Damien Le Moal's avatar
    dm crypt: Enable zoned block device support · 8e225f04
    Damien Le Moal authored
    Enable support for zoned block devices. This is done by:
    1) implementing the target report_zones method.
    2) adding the DM_TARGET_ZONED_HM flag to the target features.
    3) setting DM_CRYPT_NO_WRITE_WORKQUEUE flag to avoid IO
       processing via workqueue.
    4) Introducing inline write encryption completion to preserve write
       ordering.
    
    The last point is implemented by introducing the internal flag
    DM_CRYPT_WRITE_INLINE. When set, kcryptd_crypt_write_convert() always
    waits inline for the completion of a write request encryption if the
    request is not already completed once crypt_convert() returns.
    Completion of write request encryption is signaled using the
    restart completion by kcryptd_async_done(). This mechanism allows
    using ciphers that have an asynchronous implementation, isolating
    dm-crypt from any potential request completion reordering for these
    ciphers.
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    8e225f04
dm-crypt.c 88.1 KB