]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: remove unused legacy split/create collection methods
authorSage Weil <sage@redhat.com>
Mon, 22 Dec 2014 17:54:00 +0000 (09:54 -0800)
committerSage Weil <sage@redhat.com>
Fri, 19 Jun 2015 00:02:46 +0000 (17:02 -0700)
These are no longer needed or called.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/FileStore.cc
src/os/FileStore.h

index f18ba6f5f5f47c950dffd06a36049dee2f7c6450..d316ab0c74362706eed155f1b625e50676302f36 100644 (file)
@@ -2649,13 +2649,7 @@ unsigned FileStore::_do_transaction(
       break;
     case Transaction::OP_SPLIT_COLLECTION:
       {
-        coll_t cid = i.get_cid(op->cid);
-        uint32_t bits = op->split_bits;
-        uint32_t rem = op->split_rem;
-        coll_t dest = i.get_cid(op->dest_cid);
-        tracepoint(objectstore, split_coll_enter, osr_name);
-        r = _split_collection_create(cid, bits, rem, dest, spos);
-        tracepoint(objectstore, split_coll_exit, r);
+       assert(0 == "not legacy journal; upgrade to firefly first");
       }
       break;
     case Transaction::OP_SPLIT_COLLECTION2:
@@ -4860,22 +4854,6 @@ int FileStore::_create_collection(
   return 0;
 }
 
-// DEPRECATED -- remove with _split_collection_create
-int FileStore::_create_collection(coll_t c) 
-{
-  char fn[PATH_MAX];
-  get_cdir(c, fn, sizeof(fn));
-  dout(15) << "create_collection " << fn << dendl;
-  int r = ::mkdir(fn, 0755);
-  if (r < 0)
-    r = -errno;
-  dout(10) << "create_collection " << fn << " = " << r << dendl;
-
-  if (r < 0)
-    return r;
-  return init_index(c);
-}
-
 int FileStore::_destroy_collection(coll_t c) 
 {
   {
@@ -5249,52 +5227,6 @@ int FileStore::_split_collection(coll_t cid,
   return r;
 }
 
-// DEPRECATED: remove once we are sure there won't be any such transactions
-// replayed
-int FileStore::_split_collection_create(coll_t cid,
-                                       uint32_t bits,
-                                       uint32_t rem,
-                                       coll_t dest,
-                                       const SequencerPosition &spos)
-{
-  dout(15) << __func__ << " " << cid << " bits: " << bits << dendl;
-  int r = _create_collection(dest);
-  if (r < 0 && !(r == -EEXIST && replaying))
-    return r;
-
-  int dstcmp = _check_replay_guard(cid, spos);
-  if (dstcmp < 0)
-    return 0;
-
-  int srccmp = _check_replay_guard(dest, spos);
-  if (srccmp < 0)
-    return 0;
-
-  _set_replay_guard(cid, spos, true);
-  _set_replay_guard(dest, spos, true);
-
-  Index from;
-  r = get_index(cid, &from);
-
-  Index to;
-  if (!r) 
-    r = get_index(dest, &to);
-
-  if (!r) {
-    assert(NULL != from.index);
-    RWLock::WLocker l1((from.index)->access_lock);
-
-    assert(NULL != to.index);
-    RWLock::WLocker l2((to.index)->access_lock);
-    r = from->split(rem, bits, to.index);
-  }
-
-  _close_replay_guard(cid, spos);
-  _close_replay_guard(dest, spos);
-  return r;
-}
-
 int FileStore::_set_alloc_hint(coll_t cid, const ghobject_t& oid,
                                uint64_t expected_object_size,
                                uint64_t expected_write_size)
index d45dc01a6a83c710170823160f9e0f46c46c0cdc..1f09dd24617472d2543c5867c46e2b496f3eb135 100644 (file)
@@ -636,7 +636,6 @@ public:
                      set<string> *out);
   ObjectMap::ObjectMapIterator get_omap_iterator(coll_t c, const ghobject_t &oid);
 
-  int _create_collection(coll_t c);
   int _create_collection(coll_t c, const SequencerPosition &spos);
   int _destroy_collection(coll_t c);
   /**