]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: subscribe to map on pool full 4226/head
authorJohn Spray <john.spray@redhat.com>
Wed, 1 Apr 2015 22:47:06 +0000 (23:47 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 12 May 2015 09:20:43 +0000 (10:20 +0100)
Similar to what the objecter does for us
when the cluster-wide full flag is set.  This
allows us to pick up when the pool isn't full
any more.

Signed-off-by: John Spray <john.spray@redhat.com>
src/client/Client.cc

index cd4a8310c4871919a580407d5bbe90ad4c112907..11e1b49e5f694db20633d1a922256b0eda4d3689 100644 (file)
@@ -2155,6 +2155,14 @@ void Client::handle_osd_map(MOSDMap *m)
          i != full_pools.end(); ++i) {
       _handle_full_flag(*i);
     }
+
+    // Subscribe to subsequent maps to watch for the full flag going
+    // away.  For the global full flag objecter does this for us, but
+    // it pays no attention to the per-pool full flag so in this branch
+    // we do it ourselves.
+    if (!full_pools.empty()) {
+      objecter->maybe_request_map();
+    }
   }
 
   m->put();