From: Yan, Zheng Date: Thu, 20 Feb 2014 06:59:46 +0000 (+0800) Subject: client: call handle_cap_grant() for cap import message X-Git-Tag: v0.79~179^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6797d30032021aa9478c98cd61f5f8b1deda816e;p=ceph.git client: call handle_cap_grant() for cap import message If client sends cap message that requests new max size during exporting caps, the exporting MDS will drop the message quietly. So the client may wait for the reply that updates the max size forever. call handle_cap_grant() for cap import message can avoid this issue. Signed-off-by: Yan, Zheng --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 744a38a9a49..9975e45c992 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3441,9 +3441,12 @@ void Client::handle_caps(MClientCaps *m) } switch (m->get_op()) { - case CEPH_CAP_OP_IMPORT: return handle_cap_import(session, in, m); - case CEPH_CAP_OP_EXPORT: return handle_cap_export(session, in, m); - case CEPH_CAP_OP_FLUSHSNAP_ACK: return handle_cap_flushsnap_ack(session, in, m); + case CEPH_CAP_OP_EXPORT: + return handle_cap_export(session, in, m); + case CEPH_CAP_OP_FLUSHSNAP_ACK: + return handle_cap_flushsnap_ack(session, in, m); + case CEPH_CAP_OP_IMPORT: + handle_cap_import(session, in, m); } if (in->caps.count(mds) == 0) { @@ -3456,6 +3459,7 @@ void Client::handle_caps(MClientCaps *m) switch (m->get_op()) { case CEPH_CAP_OP_TRUNC: return handle_cap_trunc(session, in, m); + case CEPH_CAP_OP_IMPORT: case CEPH_CAP_OP_REVOKE: case CEPH_CAP_OP_GRANT: return handle_cap_grant(session, in, cap, m); case CEPH_CAP_OP_FLUSH_ACK: return handle_cap_flush_ack(session, in, cap, m); @@ -3496,7 +3500,6 @@ void Client::handle_cap_import(MetaSession *session, Inode *in, MClientCaps *m) << ", keeping exporting_issued " << ccap_string(in->exporting_issued) << " mseq " << in->exporting_mseq << " by mds." << in->exporting_mds << dendl; } - m->put(); } void Client::handle_cap_export(MetaSession *session, Inode *in, MClientCaps *m)