• Ilya Dryomov's avatar
    rbd: lock should be quiesced on reacquire · a2b1da09
    Ilya Dryomov authored
    Quiesce exclusive lock at the top of rbd_reacquire_lock() instead
    of only when ceph_cls_set_cookie() fails.  This avoids a deadlock on
    rbd_dev->lock_rwsem.
    
    If rbd_dev->lock_rwsem is needed for I/O completion, set_cookie can
    hang ceph-msgr worker thread if set_cookie reply ends up behind an I/O
    reply, because, like lock and unlock requests, set_cookie is sent and
    waited upon with rbd_dev->lock_rwsem held for write.
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    Reviewed-by: default avatarDongsheng Yang <dongsheng.yang@easystack.cn>
    a2b1da09
rbd.c 163 KB