summaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2019-06-06 17:14:49 +0200
committerIlya Dryomov <idryomov@gmail.com>2019-07-08 14:01:45 +0200
commit637cd060537d0c40bcf4f164b8a2c6e9b747e1ad (patch)
tree0f3a8d38285d2013f97c0d54fbb2ff1d3da0439c /drivers/extcon
parente1fddc8fdd22ed5a55fc7e7a81437c4663c7ba8c (diff)
downloadtalos-op-linux-637cd060537d0c40bcf4f164b8a2c6e9b747e1ad.tar.gz
talos-op-linux-637cd060537d0c40bcf4f164b8a2c6e9b747e1ad.zip
rbd: new exclusive lock wait/wake code
rbd_wait_state_locked() is built around rbd_dev->lock_waitq and blocks rbd worker threads while waiting for the lock, potentially impacting other rbd devices. There is no good way to pass an error code into image request state machines when acquisition fails, hence the use of RBD_DEV_FLAG_BLACKLISTED for everything and various other issues. Introduce rbd_dev->acquiring_list and move acquisition into image request state machine. Use rbd_img_schedule() for kicking and passing error codes. No blocking occurs while waiting for the lock, but rbd_dev->lock_rwsem is still held across lock, unlock and set_cookie calls. Always acquire the lock on "rbd map" to avoid associating the latency of acquiring the lock with the first I/O request. A slight regression is that lock_timeout is now respected only if lock acquisition is triggered by "rbd map" and not by I/O. This is somewhat compensated by the fact that we no longer block if the peer refuses to release lock -- I/O is failed with EROFS right away. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Diffstat (limited to 'drivers/extcon')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud