From: Ma Jianpeng Date: Thu, 31 Jul 2014 02:19:32 +0000 (+0800) Subject: ReplicatedPG: For async-read, set the real result after completing read. X-Git-Tag: v0.85~116^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2175%2Fhead;p=ceph.git ReplicatedPG: For async-read, set the real result after completing read. When reading an object from replicated pool, ceph uses sync mode, so it can set the results in execute_ctx correctly. However, For the async-read in EC Pool, current code didn't set the real results after read in complete_read_ctx. Signed-off-by: Ma Jianpeng --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4dae5d3fef2f..baf32a79a0cc 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5354,6 +5354,7 @@ void ReplicatedPG::complete_read_ctx(int result, OpContext *ctx) reply->set_enoent_reply_versions(info.last_update, info.last_user_version); } + reply->set_result(result); reply->add_flags(CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK); osd->send_message_osd_client(reply, m->get_connection()); close_op_ctx(ctx, 0);