]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove unused EFragment::OP_ONESHOT 11887/head
authorJohn Spray <john.spray@redhat.com>
Thu, 13 Oct 2016 17:21:29 +0000 (18:21 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 10 Nov 2016 00:08:07 +0000 (00:08 +0000)
EFragment::decode had a minimum version of 4, and
the only way you could get the ONESHOT value was if
you had a struct_v < 2.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/events/EFragment.h
src/mds/journal.cc

index 4cc2c368d956dc889931e4863b25fbd9b18645d6..cb3111c8a3f776876e96647cd85b9bbb0f1ff5d9 100644 (file)
@@ -49,8 +49,7 @@ public:
     OP_PREPARE = 1,
     OP_COMMIT = 2,
     OP_ROLLBACK = 3,
-    OP_FINISH = 4, // finish deleting orphan dirfrags
-    OP_ONESHOT = 5,  // (legacy) PREPARE+COMMIT
+    OP_FINISH = 4 // finish deleting orphan dirfrags
   };
   static const char *op_name(int o) {
     switch (o) {
index 53eb4b3ff2e9e9845143765136fd033e2d7072b5..6314ba8a2c6b1256fa7d6383053e3e68653f3764 100644 (file)
@@ -2745,8 +2745,7 @@ void EFragment::replay(MDSRank *mds)
   switch (op) {
   case OP_PREPARE:
     mds->mdcache->add_uncommitted_fragment(dirfrag_t(ino, basefrag), bits, orig_frags, _segment, &rollback);
-    // fall-thru
-  case OP_ONESHOT:
+
     if (in)
       mds->mdcache->adjust_dir_fragments(in, basefrag, bits, resultfrags, waiters, true);
     break;
@@ -2798,8 +2797,6 @@ void EFragment::decode(bufferlist::iterator &bl) {
     ::decode(stamp, bl);
   if (struct_v >= 3)
     ::decode(op, bl);
-  else
-    op = OP_ONESHOT;
   ::decode(ino, bl);
   ::decode(basefrag, bl);
   ::decode(bits, bl);