]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: EINVAL on unknown TMAP op code
authorSage Weil <sage@inktank.com>
Wed, 28 Nov 2012 04:04:34 +0000 (20:04 -0800)
committerSage Weil <sage@inktank.com>
Mon, 3 Dec 2012 11:42:17 +0000 (03:42 -0800)
The old/slow implementation did this, but the optimized version did
not.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc

index 6e0a0ff7704afc7cef0c7dd0fe05f7c04a8217e1..a4b5e5240c99aa3e5b9a0a3d5a7106a8aaccf9bd 100644 (file)
@@ -1858,6 +1858,9 @@ int ReplicatedPG::do_tmapup(OpContext *ctx, bufferlist::iterator& bp, OSDOp& osd
        }
       } else if (op == CEPH_OSD_TMAP_RMSLOPPY) {
        // do nothing
+      } else {
+       dout(10) << "  invalid tmap op " << (int)op << dendl;
+       return -EINVAL;
       }
     }