From: xie xingguo Date: Thu, 19 May 2016 08:22:48 +0000 (+0800) Subject: os/filestore: kill collection_version_current() method X-Git-Tag: v11.0.0~409^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2fd28eab670bce5923ed08d1d02045e02328e605;p=ceph.git os/filestore: kill collection_version_current() method 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 --- diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index d48c9cca39de..6775189bab53 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -2144,10 +2144,6 @@ public: */ virtual int list_collections(vector& ls) = 0; - virtual int collection_version_current(const coll_t& c, uint32_t *version) { - *version = 0; - return 1; - } /** * does a collection exist? * diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 7cd380d420bc..9ead006937c9 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -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& ls) { return list_collections(ls, false); diff --git a/src/os/filestore/FileStore.h b/src/os/filestore/FileStore.h index af638d8cbd47..b143bdfd3a49 100644 --- a/src/os/filestore/FileStore.h +++ b/src/os/filestore/FileStore.h @@ -625,7 +625,6 @@ public: vector *ls, ghobject_t *next); int list_collections(vector& ls); int list_collections(vector& 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);