• Toshi Kani's avatar
    dm snap: add fake origin_direct_access · f6e629bd
    Toshi Kani authored
    dax-capable mapped-device is marked as DM_TYPE_DAX_BIO_BASED,
    which supports both dax and bio-based operations.  dm-snap
    needs to work with dax-capable device when bio-based operation
    is used.
    
    Add fake origin_direct_access() to origin device so that its
    origin device is also marked as DM_TYPE_DAX_BIO_BASED for
    dax-capable device.  This allows to extend target's DM table.
    dm-snap works normally when bio-based operation is used.
    
    dm-snap does not support dax operation, and mount with dax
    option to a target device or snapshot device fails.
    Signed-off-by: default avatarToshi Kani <toshi.kani@hpe.com>
    Cc: Mike Snitzer <snitzer@redhat.com>
    Cc: Alasdair Kergon <agk@redhat.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    f6e629bd
dm-snap.c 57.3 KB