]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/osdc/Journaler.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / osdc / Journaler.cc
index a26d3e96029b5c5e1abbb14247b1cd342fc80648..8084a661d7d34be5cc04986dea37cc83a27d2fb6 100644 (file)
@@ -26,6 +26,7 @@
 #define dout_prefix *_dout << objecter->messenger->get_myname() \
   << ".journaler." << name << (readonly ? "(ro) ":"(rw) ")
 
+using namespace std;
 using std::chrono::seconds;
 
 
@@ -418,8 +419,8 @@ void Journaler::_finish_reread_head_and_probe(int r, C_OnFinisher *onfinish)
   }
 
   // Let the caller know that the operation has failed or was intentionally
-  // failed since the caller has been blacklisted.
-  if (r == -EBLACKLISTED) {
+  // failed since the caller has been blocklisted.
+  if (r == -EBLOCKLISTED) {
     onfinish->complete(r);
     return;
   }
@@ -704,7 +705,8 @@ void Journaler::wait_for_flush(Context *onsafe)
 {
   lock_guard l(lock);
   if (is_stopping()) {
-    onsafe->complete(-EAGAIN);
+    if (onsafe)
+      onsafe->complete(-EAGAIN);
     return;
   }
   _wait_for_flush(onsafe);
@@ -737,7 +739,8 @@ void Journaler::flush(Context *onsafe)
 {
   lock_guard l(lock);
   if (is_stopping()) {
-    onsafe->complete(-EAGAIN);
+    if (onsafe)
+      onsafe->complete(-EAGAIN);
     return;
   }
   _flush(wrap_finisher(onsafe));