aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-11-02 16:49:00 -0400
committerSage Weil <sage@newdream.net>2011-01-12 18:15:13 -0500
commitdc69e2e9fcd7c613eb744ea3b9c4ee9ca554e822 (patch)
tree4b981b9ded0e08c2ab517b48367040a7b9902ed9 /fs/ceph
parent4af25fdda6943f311a63034f80933e4d6d6e3a19 (diff)
ceph: associate requests with opening sessions
Associate request with sessions that aren't yep open. This makes the debugfs mdsc request list more informative. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/mds_client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index e22e8b41d572..509339ceef72 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1791,6 +1791,8 @@ static int __do_request(struct ceph_mds_client *mdsc,
1791 goto finish; 1791 goto finish;
1792 } 1792 }
1793 1793
1794 put_request_session(req);
1795
1794 mds = __choose_mds(mdsc, req); 1796 mds = __choose_mds(mdsc, req);
1795 if (mds < 0 || 1797 if (mds < 0 ||
1796 ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) { 1798 ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) {
@@ -1808,6 +1810,8 @@ static int __do_request(struct ceph_mds_client *mdsc,
1808 goto finish; 1810 goto finish;
1809 } 1811 }
1810 } 1812 }
1813 req->r_session = get_session(session);
1814
1811 dout("do_request mds%d session %p state %s\n", mds, session, 1815 dout("do_request mds%d session %p state %s\n", mds, session,
1812 session_state_name(session->s_state)); 1816 session_state_name(session->s_state));
1813 if (session->s_state != CEPH_MDS_SESSION_OPEN && 1817 if (session->s_state != CEPH_MDS_SESSION_OPEN &&
@@ -1820,7 +1824,6 @@ static int __do_request(struct ceph_mds_client *mdsc,
1820 } 1824 }
1821 1825
1822 /* send request */ 1826 /* send request */
1823 req->r_session = get_session(session);
1824 req->r_resend_mds = -1; /* forget any previous mds hint */ 1827 req->r_resend_mds = -1; /* forget any previous mds hint */
1825 1828
1826 if (req->r_request_started == 0) /* note request start time */ 1829 if (req->r_request_started == 0) /* note request start time */
@@ -1874,7 +1877,6 @@ static void kick_requests(struct ceph_mds_client *mdsc, int mds)
1874 if (req->r_session && 1877 if (req->r_session &&
1875 req->r_session->s_mds == mds) { 1878 req->r_session->s_mds == mds) {
1876 dout(" kicking tid %llu\n", req->r_tid); 1879 dout(" kicking tid %llu\n", req->r_tid);
1877 put_request_session(req);
1878 __do_request(mdsc, req); 1880 __do_request(mdsc, req);
1879 } 1881 }
1880 } 1882 }