From: Jimyeong Lee Date: Wed, 2 Aug 2023 00:17:07 +0000 (+0900) Subject: client: Add tailing closing square bracket once in handle_command_reply X-Git-Tag: v19.0.0~406^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1721a4f00a90be194e571ccd0ea19dc2266f0c6;p=ceph.git client: Add tailing closing square bracket once in handle_command_reply Delete unnecessary method, Add multi_id to logs Signed-off-by: Jimyeong Lee --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 55aa1b415b83..2cc4a33a247d 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -6403,7 +6403,7 @@ int Client::mds_command( op.con = conn; ldout(cct, 4) << __func__ << ": new command op to " << target_gid - << " tid=" << op.tid << cmd << dendl; + << " tid=" << op.tid << " multi_id=" << op.multi_target_id << " "<< cmd << dendl; // Construct and send MCommand MessageRef m = op.get_message(monclient->get_fsid()); @@ -6429,7 +6429,7 @@ void Client::handle_command_reply(const MConstRef& m) } auto &op = command_table.get_command(tid); - ceph_tid_t multi_id = command_table.get_multi_target_id(tid); + ceph_tid_t multi_id = op.multi_target_id; if (op.outbl) { if (multi_id != 0 && m->r == 0) { @@ -6452,7 +6452,7 @@ void Client::handle_command_reply(const MConstRef& m) } else { // when this command is the last one - if (command_table.count_multi_commands(multi_id) <= 1) { + if (command_table.count_multi_commands(multi_id) == 1) { op.outbl->append("]"); } } diff --git a/src/common/CommandTable.h b/src/common/CommandTable.h index cf57ee5e0ac3..e777d72dcf56 100644 --- a/src/common/CommandTable.h +++ b/src/common/CommandTable.h @@ -122,11 +122,6 @@ public: return commands.at(tid); } - bool get_multi_target_id(ceph_tid_t tid) const - { - return commands.at(tid).multi_target_id; - } - void erase(ceph_tid_t tid) { ceph_tid_t multi_id = commands.at(tid).multi_target_id;