]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: kill collection_version_current() method
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 19 May 2016 08:22:48 +0000 (16:22 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sun, 22 May 2016 06:38:36 +0000 (14:38 +0800)
This method is deprecated since hammer and not supported by bluestore,
and removing unnecessary code is always the preferred option.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/ObjectStore.h
src/os/filestore/FileStore.cc
src/os/filestore/FileStore.h

index d48c9cca39de213b91834146a5b9ec4bb116e6a9..6775189bab532cc42a2acdfc54bf160ec6e5999c 100644 (file)
@@ -2144,10 +2144,6 @@ public:
    */
   virtual int list_collections(vector<coll_t>& ls) = 0;
 
-  virtual int collection_version_current(const coll_t& c, uint32_t *version) {
-    *version = 0;
-    return 1;
-  }
   /**
    * does a collection exist?
    *
index 7cd380d420bc93d7725de524133a155330ef9f8c..9ead006937c95e0d11d3444eec5bd16bf40868a8 100644 (file)
@@ -4410,7 +4410,6 @@ int FileStore::_rmattr(const coll_t& cid, const ghobject_t& oid, const char *nam
   dout(15) << "rmattr " << cid << "/" << oid << " '" << name << "'" << dendl;
   FDRef fd;
   bool spill_out = true;
-  bufferptr bp;
 
   int r = lfn_open(cid, oid, false, &fd);
   if (r < 0) {
@@ -4555,23 +4554,6 @@ int FileStore::_collection_remove_recursive(const coll_t &cid,
 // --------------------------
 // collections
 
-int FileStore::collection_version_current(const coll_t& c, uint32_t *version)
-{
-  Index index;
-  int r = get_index(c, &index);
-  if (r < 0)
-    return r;
-
-  assert(NULL != index.index);
-  RWLock::RLocker l((index.index)->access_lock);
-
-  *version = index->collection_version();
-  if (*version == target_version)
-    return 1;
-  else
-    return 0;
-}
-
 int FileStore::list_collections(vector<coll_t>& ls)
 {
   return list_collections(ls, false);
index af638d8cbd4779f3632bf4a5d916354b1c5ab82a..b143bdfd3a496b19a1b80aff19376ec4d8df0e65 100644 (file)
@@ -625,7 +625,6 @@ public:
                      vector<ghobject_t> *ls, ghobject_t *next);
   int list_collections(vector<coll_t>& ls);
   int list_collections(vector<coll_t>& ls, bool include_temp);
-  int collection_version_current(const coll_t& c, uint32_t *version);
   int collection_stat(const coll_t& c, struct stat *st);
   bool collection_exists(const coll_t& c);
   bool collection_empty(const coll_t& c);