dlm: Add DLM_LKF_IDLE flag
In certain situations, dlm_lock() and dlm_unlock() can return -EBUSY to
indicate that a lock is busy and that the locking operation should be
retried later. For example, this regularly happens when a pending
locking request is canceled with dlm_unlock(DLM_LKF_CANCEL), immediately
followed by another dlm_lock().
This is problematic because callers of dlm_lock() and dlm_unlock() don't
have a way of determining when the lock will no longer be busy. Fix
that by adding a DLM_LKF_IDLE flag that will make dlm_lock() and
dlm_unlock() wait when necessary instead of returning -EBUSY.
Signed-off-by: Alexander Ahring Oder Aring <aahringo@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
3 files changed