]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/CInode: include cleanup
authorMax Kellermann <max.kellermann@ionos.com>
Fri, 4 Oct 2024 19:58:38 +0000 (21:58 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Thu, 17 Apr 2025 16:00:16 +0000 (18:00 +0200)
Un-inline the destructor to eliminate a few more dependencies from the
public header.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/mds/CInode.cc
src/mds/CInode.h

index 0487759ecb02c0601533a4613874a87c8d9ce9c7..e173e86a16a7d1fdfd49051e98767fed9e8ea54b 100644 (file)
  * 
  */
 
-#include "include/int_types.h"
-#include "common/errno.h"
+#include "CInode.h"
 
 #include <string>
 
-#include "CInode.h"
 #include "CDir.h"
 #include "CDentry.h"
 #include "BatchOp.h"
@@ -50,7 +48,6 @@
 
 #include "mds/MDSContinuation.h"
 #include "mds/InoTable.h"
-#include "cephfs_features.h"
 #include "osdc/Objecter.h"
 
 #include "messages/MClientCaps.h"
@@ -119,6 +116,17 @@ const LockType CInode::nestlock_type(CEPH_LOCK_INEST);
 const LockType CInode::flocklock_type(CEPH_LOCK_IFLOCK);
 const LockType CInode::policylock_type(CEPH_LOCK_IPOLICY);
 
+CInode::~CInode() {
+  close_dirfrags();
+  close_snaprealm();
+  clear_file_locks();
+  ceph_assert(num_projected_srnodes == 0);
+  ceph_assert(num_caps_notable == 0);
+  ceph_assert(num_subtree_roots == 0);
+  ceph_assert(num_exporting_dirs == 0);
+  ceph_assert(batch_ops.empty());
+}
+
 std::string_view CInode::pin_name(int p) const
 {
   switch (p) {
index 627ec5e641419a5eefbcf6913f54f56b0ebaba34..af7abf5beb40af219f95bc7d1721e98e03711667 100644 (file)
 #include "common/config.h"
 #include "common/debug.h"
 #include "common/ref.h" // for cref_t
-#include "common/RefCountedObj.h"
 #include "include/compat.h"
 #include "include/Context.h" // for C_GatherBuilder
 #include "include/counter.h"
 #include "include/elist.h"
 #include "include/filepath.h"
 #include "include/types.h"
-#include "include/lru.h"
 #include "include/compact_set.h"
 
 #include "MDSCacheObject.h"
 #include "flock.h"
 #include "inode_backtrace.h" // for inode_backtrace_t
 
-#include "BatchOp.h"
-#include "CDentry.h"
 #include "ScrubHeader.h"
 #include "SimpleLock.h"
 #include "ScatterLock.h"
 #include "LocalLockC.h"
 #include "Capability.h"
-#include "SnapRealm.h"
-#include "Mutation.h"
-
-#include "messages/MClientCaps.h"
 
 #include <boost/intrusive_ptr.hpp>
 
@@ -428,16 +420,7 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno
   // ---------------------------
   CInode() = delete;
   CInode(MDCache *c, bool auth=true, snapid_t f=2, snapid_t l=CEPH_NOSNAP);
-  ~CInode() override {
-    close_dirfrags();
-    close_snaprealm();
-    clear_file_locks();
-    ceph_assert(num_projected_srnodes == 0);
-    ceph_assert(num_caps_notable == 0);
-    ceph_assert(num_subtree_roots == 0);
-    ceph_assert(num_exporting_dirs == 0);
-    ceph_assert(batch_ops.empty());
-  }
+  ~CInode() override;
 
   std::map<int, std::unique_ptr<BatchOp>> batch_ops;