aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-11-22 01:48:37 -0500
committerYan, Zheng <zheng.z.yan@intel.com>2014-01-21 00:29:33 -0500
commit186e4f7a4b1883f3f46aa15366c0bcebc28fdda7 (patch)
tree304069ce2e1b36f7935cd4e33dc1d692843df7c3 /fs/ceph/mds_client.c
parent9215aeea622fec7ca8123c6bd6f03a1753e2b0b3 (diff)
ceph: handle session flush message
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 1fd655ac806a..7c00dd530bd1 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1137,6 +1137,21 @@ static int send_renew_caps(struct ceph_mds_client *mdsc,
1137 return 0; 1137 return 0;
1138} 1138}
1139 1139
1140static int send_flushmsg_ack(struct ceph_mds_client *mdsc,
1141 struct ceph_mds_session *session, u64 seq)
1142{
1143 struct ceph_msg *msg;
1144
1145 dout("send_flushmsg_ack to mds%d (%s)s seq %lld\n",
1146 session->s_mds, session_state_name(session->s_state), seq);
1147 msg = create_session_msg(CEPH_SESSION_FLUSHMSG_ACK, seq);
1148 if (!msg)
1149 return -ENOMEM;
1150 ceph_con_send(&session->s_con, msg);
1151 return 0;
1152}
1153
1154
1140/* 1155/*
1141 * Note new cap ttl, and any transition from stale -> not stale (fresh?). 1156 * Note new cap ttl, and any transition from stale -> not stale (fresh?).
1142 * 1157 *
@@ -2396,6 +2411,10 @@ static void handle_session(struct ceph_mds_session *session,
2396 trim_caps(mdsc, session, le32_to_cpu(h->max_caps)); 2411 trim_caps(mdsc, session, le32_to_cpu(h->max_caps));
2397 break; 2412 break;
2398 2413
2414 case CEPH_SESSION_FLUSHMSG:
2415 send_flushmsg_ack(mdsc, session, seq);
2416 break;
2417
2399 default: 2418 default:
2400 pr_err("mdsc_handle_session bad op %d mds%d\n", op, mds); 2419 pr_err("mdsc_handle_session bad op %d mds%d\n", op, mds);
2401 WARN_ON(1); 2420 WARN_ON(1);