]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add error handler with lock support
authorXiubo Li <xiubli@redhat.com>
Wed, 9 Sep 2020 03:13:01 +0000 (23:13 -0400)
committerXiubo Li <xiubli@redhat.com>
Thu, 24 Sep 2020 07:31:09 +0000 (15:31 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/MDSRank.cc
src/mds/MDSRank.h

index 80e1efe215bca4da50a702050a29de59730c0ecc..f5b760b13350215ad7fadc4fb658dddab4d4c3df 100644 (file)
@@ -968,6 +968,12 @@ void MDSRank::handle_write_error(int err)
   }
 }
 
+void MDSRank::handle_write_error_with_lock(int err)
+{
+  std::scoped_lock l(mds_lock);
+  handle_write_error(err);
+}
+
 void *MDSRank::ProgressThread::entry()
 {
   std::unique_lock l(mds->mds_lock);
index ceaaf1148a3ef427feb2b5537a11b684aa318819..0ec83ffea41c1ff5d2139f8fb3227a6abf608245 100644 (file)
@@ -215,6 +215,7 @@ class MDSRank {
     }
 
     void handle_write_error(int err);
+    void handle_write_error_with_lock(int err);
 
     void update_mlogger();