]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: watch_flush() on shutdown
authorSage Weil <sage@redhat.com>
Fri, 19 Dec 2014 19:50:38 +0000 (11:50 -0800)
committerSage Weil <sage@redhat.com>
Tue, 23 Dec 2014 01:41:32 +0000 (17:41 -0800)
Users can easily forget this. It makes shutdown potentially block, but if
they have racing callbacks they get what they ask for.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 30678f6daf0a71b6074c061c6b4aec6386372368)

src/librados/RadosClient.cc

index c2986fb4332cc9f9166078ea7f7f2d385ca19205..a5b89a07960bb8be21e67ca120870d0c2a100c8b 100644 (file)
@@ -282,6 +282,9 @@ int librados::RadosClient::connect()
 
 void librados::RadosClient::shutdown()
 {
+  // make sure watch callbacks are flushed
+  watch_flush();
+
   lock.Lock();
   if (state == DISCONNECTED) {
     lock.Unlock();