• Kiyoshi Ueda's avatar
    dm table: remove dm_get from dm_table_get_md · ecdb2e25
    Kiyoshi Ueda authored
    Remove the dm_get() in dm_table_get_md() because dm_table_get_md() could
    be called from presuspend/postsuspend, which are called while
    mapped_device is in DMF_FREEING state, where dm_get() is not allowed.
    
    Justification for that is the lifetime of both objects: As far as the
    current dm design/implementation, mapped_device is never freed while
    targets are doing something, because dm core waits for targets to become
    quiet in dm_put() using presuspend/postsuspend.  So targets should be
    able to touch mapped_device without holding reference count of the
    mapped_device, and we should allow targets to touch mapped_device even
    if it is in DMF_FREEING state.
    
    Backgrounds:
    I'm trying to remove the multipath internal queue, since dm core now has
    a generic queue for request-based dm.  In the patch-set, the multipath
    target wants to request dm core to start/stop queue.  One of such
    start/stop requests can happen during postsuspend() while the target
    waits for pg-init to comp...
    ecdb2e25
dm-uevent.c 5.29 KB