]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::record_write_error: send only the flags requested by the op
authorSamuel Just <sjust@redhat.com>
Sun, 4 Dec 2016 02:08:36 +0000 (18:08 -0800)
committerSamuel Just <sjust@redhat.com>
Sun, 4 Dec 2016 02:08:36 +0000 (18:08 -0800)
This isn't really important, but it's nice to be consistent with
OSD::reply_op_error.  Yet another reason to do away with the ack flag.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index eb77dd73a4deea2f3b5e8f30558588829ebd42c8..26c5b14d0af42b58f643082da000308208be46fb 100644 (file)
@@ -2342,8 +2342,8 @@ void ReplicatedPG::record_write_error(OpRequestRef op, const hobject_t &soid,
     boost::optional<std::function<void(void)> >(
       [=]() {
        dout(20) << "finished " << __func__ << " r=" << r << dendl;
-       int flags = CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK;
        MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
+       int flags = m->get_flags() & (CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK);
        MOSDOpReply *reply = orig_reply;
        if (reply == nullptr) {
          reply = new MOSDOpReply(m, r, get_osdmap()->get_epoch(),