Skip to content

Commit 8d5f550

Browse files
authored
Merge pull request ceph#52990 from ajarr/fix-61607
librbd: kick ExclusiveLock state machine on client being blocklisted when waiting for lock Reviewed-by: Ilya Dryomov <[email protected]>
2 parents 0a4bb7e + e66db76 commit 8d5f550

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librbd/ImageWatcher.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,7 @@ void ImageWatcher<I>::schedule_request_lock(bool use_timer, int timer_delay) {
576576
return;
577577
}
578578

579-
std::shared_lock watch_locker{this->m_watch_lock};
580-
if (this->is_registered(this->m_watch_lock)) {
579+
if (is_registered()) {
581580
ldout(m_image_ctx.cct, 15) << this << " requesting exclusive lock" << dendl;
582581

583582
auto ctx = new LambdaContext([this](int r) {
@@ -595,6 +594,10 @@ void ImageWatcher<I>::schedule_request_lock(bool use_timer, int timer_delay) {
595594
} else {
596595
m_task_finisher->queue(TASK_CODE_REQUEST_LOCK, ctx);
597596
}
597+
} else if (is_blocklisted()) {
598+
lderr(m_image_ctx.cct) << this << " blocklisted waiting for exclusive lock"
599+
<< dendl;
600+
m_image_ctx.exclusive_lock->handle_peer_notification(0);
598601
}
599602
}
600603

0 commit comments

Comments
 (0)