Currently, operations will hang in cases below, even we set osd_request_timeout. (1). We set osd_request_timeout, when a writing is doing rbd_wait_state_locked(). At this moment, the ceph cluster is not reachable. Then the rbd_aquire_lock() will call rbd_try_acquire_lock() again and again. but the rbd_wait_state_locked() will never be wake up. (2). There is a mapping with exclusive, then this device will refuse to release the lock. if there is another mapping without exclusive, any writing to this device will be blocked until the exclusive mapping unmapped. To avoid the operation hang in these cases, this patch introduce an option named as state_lock_timeout. if we set this option, we will get an -ETIMEDOUT when we reach a timeout rather than waiting forever. and if this option not set, everything works as what it was. Dongsheng Yang (3): rbd: support timeout in rbd_wait_state_locked rbd: add an option to set state_lock_timeout rbd: show the state_lock_timeout option in sysfs drivers/block/rbd.c | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html