aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ceph/osd_client.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 41a4abc7e98e..c4ec9239249a 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1306,8 +1306,6 @@ static void __unregister_linger_request(struct ceph_osd_client *osdc,
1306 if (list_empty(&req->r_osd_item)) 1306 if (list_empty(&req->r_osd_item))
1307 req->r_osd = NULL; 1307 req->r_osd = NULL;
1308 } 1308 }
1309
1310 list_del_init(&req->r_req_lru_item); /* can be on notarget */
1311 ceph_osdc_put_request(req); 1309 ceph_osdc_put_request(req);
1312} 1310}
1313 1311
@@ -2017,20 +2015,29 @@ static void kick_requests(struct ceph_osd_client *osdc, bool force_resend,
2017 err = __map_request(osdc, req, 2015 err = __map_request(osdc, req,
2018 force_resend || force_resend_writes); 2016 force_resend || force_resend_writes);
2019 dout("__map_request returned %d\n", err); 2017 dout("__map_request returned %d\n", err);
2020 if (err == 0)
2021 continue; /* no change and no osd was specified */
2022 if (err < 0) 2018 if (err < 0)
2023 continue; /* hrm! */ 2019 continue; /* hrm! */
2024 if (req->r_osd == NULL) { 2020 if (req->r_osd == NULL || err > 0) {
2025 dout("tid %llu maps to no valid osd\n", req->r_tid); 2021 if (req->r_osd == NULL) {
2026 needmap++; /* request a newer map */ 2022 dout("lingering %p tid %llu maps to no osd\n",
2027 continue; 2023 req, req->r_tid);
2028 } 2024 /*
2025 * A homeless lingering request makes
2026 * no sense, as it's job is to keep
2027 * a particular OSD connection open.
2028 * Request a newer map and kick the
2029 * request, knowing that it won't be
2030 * resent until we actually get a map
2031 * that can tell us where to send it.
2032 */
2033 needmap++;
2034 }
2029 2035
2030 dout("kicking lingering %p tid %llu osd%d\n", req, req->r_tid, 2036 dout("kicking lingering %p tid %llu osd%d\n", req,
2031 req->r_osd ? req->r_osd->o_osd : -1); 2037 req->r_tid, req->r_osd ? req->r_osd->o_osd : -1);
2032 __register_request(osdc, req); 2038 __register_request(osdc, req);
2033 __unregister_linger_request(osdc, req); 2039 __unregister_linger_request(osdc, req);
2040 }
2034 } 2041 }
2035 reset_changed_osds(osdc); 2042 reset_changed_osds(osdc);
2036 mutex_unlock(&osdc->request_mutex); 2043 mutex_unlock(&osdc->request_mutex);