]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CDentry/CDir/CInode: Add comment on use of boost::pool.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 23 Feb 2011 22:17:48 +0000 (14:17 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 2 Mar 2011 00:25:33 +0000 (16:25 -0800)
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/CDentry.h
src/mds/CDir.h
src/mds/CInode.h

index ca3f2f97649d2703b2b359fd8f767dfed0f0aa01..127dddc977a103ff259bdd6b1d68ddacb091759b 100644 (file)
@@ -50,6 +50,13 @@ bool operator<(const CDentry& l, const CDentry& r);
 
 // dentry
 class CDentry : public MDSCacheObject, public LRUObject {
+  /*
+   * This class uses a boost::pool to handle allocation. This is *not*
+   * thread-safe, so don't do allocations from multiple threads!
+   *
+   * Alternatively, switch the pool to use a boost::singleton_pool.
+   */
+
 private:
   static boost::pool<> pool;
 public:
index 3790dfe189f6b93dd89cb8581cb837666f8cfc2d..3d312dc46d14d33688ce747da49e88959f5888bd 100644 (file)
@@ -43,9 +43,13 @@ class bloom_filter;
 class ObjectOperation;
 
 ostream& operator<<(ostream& out, class CDir& dir);
-
-
 class CDir : public MDSCacheObject {
+  /*
+   * This class uses a boost::pool to handle allocation. This is *not*
+   * thread-safe, so don't do allocations from multiple threads!
+   *
+   * Alternatively, switch the pool to use a boost::singleton_pool.
+   */
 private:
   static boost::pool<> pool;
 public:
index 3c79245320d2088c9ac87b8f25ed1e138f90d981..a534f394391a00758312a2638f7f6af2c5f3da95 100644 (file)
@@ -93,6 +93,13 @@ WRITE_CLASS_ENCODER(default_file_layout);
 
 // cached inode wrapper
 class CInode : public MDSCacheObject {
+  /*
+   * This class uses a boost::pool to handle allocation. This is *not*
+   * thread-safe, so don't do allocations from multiple threads!
+   *
+   * Alternatively, switch the pool to use a boost::singleton_pool.
+   */
+
 private:
   static boost::pool<> pool;
 public: