1f1c83
From 00e90946e6ffc0bb5bf11f02d6fd8993974e8159 Mon Sep 17 00:00:00 2001
1f1c83
From: Kefu Chai <kchai@redhat.com>
1f1c83
Date: Sat, 24 Jul 2021 00:09:58 +0800
1f1c83
Subject: [PATCH 1/3] osdc/Objecter: move LingerOp's ctor to .cc
1f1c83
1f1c83
so the linkage of fmt::fmt does not spill out to other compilation
1f1c83
units.
1f1c83
1f1c83
Signed-off-by: Kefu Chai <kchai@redhat.com>
1f1c83
---
1f1c83
 src/osdc/Objecter.cc | 7 +++++++
1f1c83
 src/osdc/Objecter.h  | 6 +-----
1f1c83
 2 files changed, 8 insertions(+), 5 deletions(-)
1f1c83
1f1c83
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
1f1c83
index d935b73adb9..da25c584f79 100644
1f1c83
--- a/src/osdc/Objecter.cc
1f1c83
+++ b/src/osdc/Objecter.cc
1f1c83
@@ -4722,6 +4722,13 @@ void Objecter::handle_command_reply(MCommandReply *m)
1f1c83
   m->put();
1f1c83
 }
1f1c83
 
1f1c83
+Objecter::LingerOp::LingerOp(Objecter *o, uint64_t linger_id)
1f1c83
+  : objecter(o),
1f1c83
+    linger_id(linger_id),
1f1c83
+    watch_lock(ceph::make_shared_mutex(
1f1c83
+		 fmt::format("LingerOp::watch_lock #{}", linger_id)))
1f1c83
+{}
1f1c83
+
1f1c83
 void Objecter::submit_command(CommandOp *c, ceph_tid_t *ptid)
1f1c83
 {
1f1c83
   shunique_lock sul(rwlock, ceph::acquire_unique);
1f1c83
diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h
1f1c83
index 5af605913c0..163a3359de7 100644
1f1c83
--- a/src/osdc/Objecter.h
1f1c83
+++ b/src/osdc/Objecter.h
1f1c83
@@ -2304,11 +2304,7 @@ public:
1f1c83
       watch_pending_async.pop_front();
1f1c83
     }
1f1c83
 
1f1c83
-    explicit LingerOp(Objecter *o, uint64_t linger_id)
1f1c83
-      : objecter(o), linger_id(linger_id),
1f1c83
-	watch_lock(ceph::make_shared_mutex(
1f1c83
-		     fmt::format("LingerOp::watch_lock #{}", linger_id))) {}
1f1c83
-
1f1c83
+    LingerOp(Objecter *o, uint64_t linger_id);
1f1c83
     const LingerOp& operator=(const LingerOp& r) = delete;
1f1c83
     LingerOp(const LingerOp& o) = delete;
1f1c83
 
1f1c83
-- 
1f1c83
2.31.1
1f1c83