Lines Matching refs:mds

349 						   int mds)  in __ceph_lookup_mds_session()  argument
353 if (mds >= mdsc->max_sessions || mdsc->sessions[mds] == NULL) in __ceph_lookup_mds_session()
355 session = mdsc->sessions[mds]; in __ceph_lookup_mds_session()
362 static bool __have_session(struct ceph_mds_client *mdsc, int mds) in __have_session() argument
364 if (mds >= mdsc->max_sessions) in __have_session()
366 return mdsc->sessions[mds]; in __have_session()
383 int mds) in register_session() argument
391 s->s_mds = mds; in register_session()
419 dout("register_session mds%d\n", mds); in register_session()
420 if (mds >= mdsc->max_sessions) { in register_session()
421 int newmax = 1 << get_count_order(mds+1); in register_session()
436 mdsc->sessions[mds] = s; in register_session()
439 ceph_con_open(&s->s_con, CEPH_ENTITY_TYPE_MDS, mds, in register_session()
440 ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); in register_session()
645 int mds = -1; in __choose_mds() local
710 mds = frag.dist[r]; in __choose_mds()
714 frag.frag, mds, in __choose_mds()
716 if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >= in __choose_mds()
718 return mds; in __choose_mds()
725 if (frag.mds >= 0) { in __choose_mds()
727 mds = frag.mds; in __choose_mds()
730 inode, ceph_vinop(inode), frag.frag, mds); in __choose_mds()
731 if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >= in __choose_mds()
733 return mds; in __choose_mds()
748 mds = cap->session->s_mds; in __choose_mds()
750 inode, ceph_vinop(inode), mds, in __choose_mds()
753 return mds; in __choose_mds()
756 mds = ceph_mdsmap_get_random_mds(mdsc->mdsmap); in __choose_mds()
757 dout("choose_mds chose random mds%d\n", mds); in __choose_mds()
758 return mds; in __choose_mds()
792 int mds = session->s_mds; in __open_session() local
795 mstate = ceph_mdsmap_get_state(mdsc->mdsmap, mds); in __open_session()
796 dout("open_session to mds%d (%s)\n", mds, in __open_session()
819 int i, mds = session->s_mds; in __open_export_target_sessions() local
822 if (mds >= mdsc->mdsmap->m_max_mds) in __open_export_target_sessions()
824 mi = &mdsc->mdsmap->m_info[mds]; in __open_export_target_sessions()
1281 int mds, ret = 1; in check_cap_flush() local
1285 for (mds = 0; ret && mds < mdsc->max_sessions; mds++) { in check_cap_flush()
1286 struct ceph_mds_session *session = mdsc->sessions[mds]; in check_cap_flush()
1617 int mds) in create_request_message() argument
1688 mds, req->r_inode_drop, req->r_inode_unless, 0); in create_request_message()
1691 mds, req->r_dentry_drop, req->r_dentry_unless); in create_request_message()
1694 mds, req->r_old_dentry_drop, req->r_old_dentry_unless); in create_request_message()
1698 mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); in create_request_message()
1738 int mds) in __prepare_send_request() argument
1747 ceph_get_cap_for_mds(ceph_inode(req->r_inode), mds); in __prepare_send_request()
1787 msg = create_request_message(mdsc, req, mds); in __prepare_send_request()
1817 int mds = -1; in __do_request() local
1835 mds = __choose_mds(mdsc, req); in __do_request()
1836 if (mds < 0 || in __do_request()
1837 ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) { in __do_request()
1844 session = __ceph_lookup_mds_session(mdsc, mds); in __do_request()
1846 session = register_session(mdsc, mds); in __do_request()
1854 dout("do_request mds%d session %p state %s\n", mds, session, in __do_request()
1871 err = __prepare_send_request(mdsc, req, mds); in __do_request()
1911 static void kick_requests(struct ceph_mds_client *mdsc, int mds) in kick_requests() argument
1916 dout("kick_requests mds%d\n", mds); in kick_requests()
1922 req->r_session->s_mds == mds) { in kick_requests()
2051 int mds = session->s_mds; in handle_reply() local
2083 head->safe ? "safe" : "unsafe", tid, mds); in handle_reply()
2089 tid, mds); in handle_reply()
2146 dout("got safe reply %llu, mds%d\n", tid, mds); in handle_reply()
2167 pr_err("mdsc_handle_reply got corrupt reply mds%d(tid:%lld)\n", mds, tid); in handle_reply()
2282 int mds = session->s_mds; in handle_session() local
2302 mds, ceph_session_op_name(op), session, in handle_session()
2332 kick_requests(mdsc, mds); in handle_session()
2350 pr_err("mdsc_handle_session bad op %d mds%d\n", op, mds); in handle_session()
2363 pr_err("mdsc_handle_session corrupt message mds%d len %d\n", mds, in handle_session()
2525 int mds = session->s_mds; in send_mds_reconnect() local
2530 pr_info("mds%d reconnect start\n", mds); in send_mds_reconnect()
2547 CEPH_ENTITY_TYPE_MDS, mds, in send_mds_reconnect()
2548 ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); in send_mds_reconnect()
2616 pr_err("error %d preparing reconnect for mds%d\n", err, mds); in send_mds_reconnect()
2742 int mds = session->s_mds; in handle_lease() local
2749 dout("handle_lease from mds%d\n", mds); in handle_lease()