]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: move CDentry container members to mempool
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 15 Jan 2018 16:28:27 +0000 (08:28 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 7 Feb 2018 14:40:46 +0000 (06:40 -0800)
Partial-fix: http://tracker.ceph.com/issues/21402

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/CDentry.cc
src/mds/CDentry.h
src/mds/SimpleLock.h

index f2fe401c46b8f232fba1d442a87cd7eef3dee531..7e22d1e7f2239af2d09cb28afff70a8a031ffc20 100644 (file)
@@ -220,7 +220,7 @@ void CDentry::make_path(filepath& fp, bool projected) const
 {
   assert(dir);
   dir->inode->make_path(fp, projected);
-  fp.push_dentry(name);
+  fp.push_dentry(get_name());
 }
 
 /*
index 689f0ffe6c2cb49813286fa2649125ff70f5ff37..5de3db1b59f36a7088a5a5c50a65c84161f55f87 100644 (file)
@@ -104,19 +104,21 @@ public:
 
   CDentry(std::string_view n, __u32 h,
          snapid_t f, snapid_t l) :
-    name(n), hash(h),
+    hash(h),
     first(f), last(l),
     item_dirty(this),
     lock(this, &lock_type),
-    versionlock(this, &versionlock_type)
+    versionlock(this, &versionlock_type),
+    name(n)
   {}
   CDentry(std::string_view n, __u32 h, inodeno_t ino, unsigned char dt,
          snapid_t f, snapid_t l) :
-    name(n), hash(h),
+    hash(h),
     first(f), last(l),
     item_dirty(this),
     lock(this, &lock_type),
-    versionlock(this, &versionlock_type)
+    versionlock(this, &versionlock_type),
+    name(n)
   {
     linkage.remote_ino = ino;
     linkage.remote_d_type = dt;
@@ -341,7 +343,6 @@ public:
   void dump(Formatter *f) const;
 
 
-  std::string name;
   __u32 hash;
   snapid_t first, last;
 
@@ -352,10 +353,10 @@ public:
   static LockType lock_type;
   static LockType versionlock_type;
 
-  SimpleLock lock;
-  LocalLock versionlock;
+  SimpleLock lock; // FIXME referenced containers not in mempool
+  LocalLock versionlock; // FIXME referenced containers not in mempool
 
-  map<client_t,ClientLease*> client_lease_map;
+  mempool::mds_co::map<client_t,ClientLease*> client_lease_map;
 
 
 protected:
@@ -368,10 +369,13 @@ protected:
 
   CDir *dir = nullptr;     // containing dirfrag
   linkage_t linkage;
-  list<linkage_t> projected;
+  mempool::mds_co::list<linkage_t> projected;
 
   version_t version = 0;  // dir version when last touched.
   version_t projected_version = 0;  // what it will be when i unlock/commit.
+
+private:
+  mempool::mds_co::string name;
 };
 
 ostream& operator<<(ostream& out, const CDentry& dn);
index f3cbdf698d5ab90b18b3953d3c5b9f506ac51014..a8d8cb6b74373228eb119b8f209d1e81dfb0aa40 100644 (file)
@@ -177,6 +177,7 @@ protected:
 private:
   int num_rdlock;
 
+  // XXX not in mempool
   struct unstable_bits_t {
     set<__s32> gather_set;  // auth+rep.  >= 0 is mds, < 0 is client