summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2023-08-01 19:14:24 +0200
committerIlya Dryomov <idryomov@gmail.com>2023-08-02 09:07:34 +0200
commit9d01e07fd1bfb4daae156ab528aa196f5ac2b2bc (patch)
tree66dbdc030d34d249467716fbac8811ce93eef460 /net
parentceph: defer stopping mdsc delayed_work (diff)
downloadlinux-9d01e07fd1bfb4daae156ab528aa196f5ac2b2bc.tar.xz
linux-9d01e07fd1bfb4daae156ab528aa196f5ac2b2bc.zip
rbd: prevent busy loop when requesting exclusive lock
Due to rbd_try_acquire_lock() effectively swallowing all but EBLOCKLISTED error from rbd_try_lock() ("request lock anyway") and rbd_request_lock() returning ETIMEDOUT error not only for an actual notify timeout but also when the lock owner doesn't respond, a busy loop inside of rbd_acquire_lock() between rbd_try_acquire_lock() and rbd_request_lock() is possible. Requesting the lock on EBUSY error (returned by get_lock_owner_info() if an incompatible lock or invalid lock owner is detected) makes very little sense. The same goes for ETIMEDOUT error (might pop up pretty much anywhere if osd_request_timeout option is set) and many others. Just fail I/O requests on rbd_dev->acquiring_list immediately on any error from rbd_try_lock(). Cc: stable@vger.kernel.org # 588159009d5b: rbd: retrieve and check lock owner twice before blocklisting Cc: stable@vger.kernel.org Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions