]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: gracefully handle blacklisted client in ImageWatcher
authorJason Dillaman <dillaman@redhat.com>
Tue, 12 Apr 2016 15:19:45 +0000 (11:19 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 12 Apr 2016 20:23:44 +0000 (16:23 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/ImageWatcher.cc

index 9579723b2271091a4ccc10e2cc42c5a3ac22881a..63a085f65cd6702e5bacfe506b43ef1d8b400643 100644 (file)
@@ -459,6 +459,9 @@ Context *ImageWatcher::remove_async_request(const AsyncRequestId &id) {
 }
 
 void ImageWatcher::schedule_async_request_timed_out(const AsyncRequestId &id) {
+  ldout(m_image_ctx.cct, 20) << "scheduling async request time out: " << id
+                             << dendl;
+
   Context *ctx = new FunctionContext(boost::bind(
     &ImageWatcher::async_request_timed_out, this, id));
 
@@ -896,6 +899,11 @@ void ImageWatcher::reregister_watch() {
   int r;
   if (releasing_lock) {
     r = release_lock_ctx.wait();
+    if (r == -EBLACKLISTED) {
+      lderr(m_image_ctx.cct) << this << " client blacklisted" << dendl;
+      return;
+    }
+
     assert(r == 0);
   }