summary refs log tree commit diff
path: root/block
diff options
context:
space:
mode:
authorDongsheng Yang <dongsheng.yang@easystack.cn>2018-03-26 10:22:55 -0400
committerIlya Dryomov <idryomov@gmail.com>2018-04-16 09:38:40 +0200
commit34f55d0b3a0a39c95134c0c89173893b846d4c80 (patch)
treec4421bd5aa961599e55a35a0151f18b528c9f8d6 /block
parent2f18d46683cb3047c41229d57cf7c6e2ee48676f (diff)
downloadlinux-34f55d0b3a0a39c95134c0c89173893b846d4c80.tar.gz
rbd: support timeout in rbd_wait_state_locked()
currently, the rbd_wait_state_locked() will wait forever if we
can't get our state locked. Example:

rbd map --exclusive test1  --> /dev/rbd0
rbd map test1  --> /dev/rbd1
dd if=/dev/zero of=/dev/rbd1 bs=1M count=1 --> IO blocked

To avoid this problem, this patch introduce a timeout design
in rbd_wait_state_locked(). Then rbd_wait_state_locked() will
return error when we reach a timeout.

This patch allow user to set the lock_timeout in rbd mapping.

Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions