浏览代码

ceph: only send cap releases when mds is OPEN|HUNG

On OPENING we shouldn't have any caps (or releases).
On CLOSING, we should wait until we succeed (and throw it all out), or
don't (and are OPEN again).
On RECONNECTING we can wait until we are OPEN.

Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil 15 年之前
父节点
当前提交
aab53dd9e8
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      fs/ceph/mds_client.c

+ 3 - 1
fs/ceph/mds_client.c

@@ -2647,7 +2647,9 @@ static void delayed_work(struct work_struct *work)
 		else
 			ceph_con_keepalive(&s->s_con);
 		add_cap_releases(mdsc, s, -1);
-		send_cap_releases(mdsc, s);
+		if (s->s_state == CEPH_MDS_SESSION_OPEN ||
+		    s->s_state == CEPH_MDS_SESSION_HUNG)
+			send_cap_releases(mdsc, s);
 		mutex_unlock(&s->s_mutex);
 		ceph_put_mds_session(s);