diff options
author | Sage Weil <sage@newdream.net> | 2010-11-02 16:41:47 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-01-12 18:15:13 -0500 |
commit | 4af25fdda6943f311a63034f80933e4d6d6e3a19 (patch) | |
tree | 8d0be03aedc4d3ea09ba0b8d3f1b63df4ef302e1 /fs/ceph | |
parent | 14303d20f3ae3e6ab626c77a4aac202b3bafd377 (diff) |
ceph: drop redundant r_mds field
The r_mds field is redundant, since we can find the same information at
r_session->s_mds, and when r_session is NULL then r_mds is meaningless.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/debugfs.c | 9 | ||||
-rw-r--r-- | fs/ceph/mds_client.c | 8 | ||||
-rw-r--r-- | fs/ceph/mds_client.h | 1 |
3 files changed, 11 insertions, 7 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 7ae1b3d55b58..08f65faac112 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c | |||
@@ -60,10 +60,13 @@ static int mdsc_show(struct seq_file *s, void *p) | |||
60 | for (rp = rb_first(&mdsc->request_tree); rp; rp = rb_next(rp)) { | 60 | for (rp = rb_first(&mdsc->request_tree); rp; rp = rb_next(rp)) { |
61 | req = rb_entry(rp, struct ceph_mds_request, r_node); | 61 | req = rb_entry(rp, struct ceph_mds_request, r_node); |
62 | 62 | ||
63 | if (req->r_request) | 63 | if (req->r_request && req->r_session) |
64 | seq_printf(s, "%lld\tmds%d\t", req->r_tid, req->r_mds); | 64 | seq_printf(s, "%lld\tmds%d\t", req->r_tid, |
65 | else | 65 | req->r_session->s_mds); |
66 | else if (!req->r_request) | ||
66 | seq_printf(s, "%lld\t(no request)\t", req->r_tid); | 67 | seq_printf(s, "%lld\t(no request)\t", req->r_tid); |
68 | else | ||
69 | seq_printf(s, "%lld\t(no session)\t", req->r_tid); | ||
67 | 70 | ||
68 | seq_printf(s, "%s", ceph_mds_op_name(req->r_op)); | 71 | seq_printf(s, "%s", ceph_mds_op_name(req->r_op)); |
69 | 72 | ||
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 9be29b06a2d9..e22e8b41d572 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1705,7 +1705,6 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc, | |||
1705 | struct ceph_msg *msg; | 1705 | struct ceph_msg *msg; |
1706 | int flags = 0; | 1706 | int flags = 0; |
1707 | 1707 | ||
1708 | req->r_mds = mds; | ||
1709 | req->r_attempts++; | 1708 | req->r_attempts++; |
1710 | if (req->r_inode) { | 1709 | if (req->r_inode) { |
1711 | struct ceph_cap *cap = | 1710 | struct ceph_cap *cap = |
@@ -2068,8 +2067,11 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) | |||
2068 | goto out; | 2067 | goto out; |
2069 | } else { | 2068 | } else { |
2070 | struct ceph_inode_info *ci = ceph_inode(req->r_inode); | 2069 | struct ceph_inode_info *ci = ceph_inode(req->r_inode); |
2071 | struct ceph_cap *cap = | 2070 | struct ceph_cap *cap = NULL; |
2072 | ceph_get_cap_for_mds(ci, req->r_mds);; | 2071 | |
2072 | if (req->r_session) | ||
2073 | cap = ceph_get_cap_for_mds(ci, | ||
2074 | req->r_session->s_mds); | ||
2073 | 2075 | ||
2074 | dout("already using auth"); | 2076 | dout("already using auth"); |
2075 | if ((!cap || cap != ci->i_auth_cap) || | 2077 | if ((!cap || cap != ci->i_auth_cap) || |
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index f8f27f6eaa90..4e3a9cc0bba6 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h | |||
@@ -166,7 +166,6 @@ struct ceph_mds_request { | |||
166 | struct ceph_mds_client *r_mdsc; | 166 | struct ceph_mds_client *r_mdsc; |
167 | 167 | ||
168 | int r_op; /* mds op code */ | 168 | int r_op; /* mds op code */ |
169 | int r_mds; | ||
170 | 169 | ||
171 | /* operation on what? */ | 170 | /* operation on what? */ |
172 | struct inode *r_inode; /* arg1 */ | 171 | struct inode *r_inode; /* arg1 */ |