Commit e6d28318 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  libceph: fix linger request requeueing
parents e27e6151 77f38e0e
...@@ -579,9 +579,15 @@ static void __kick_osd_requests(struct ceph_osd_client *osdc, ...@@ -579,9 +579,15 @@ static void __kick_osd_requests(struct ceph_osd_client *osdc,
list_for_each_entry_safe(req, nreq, &osd->o_linger_requests, list_for_each_entry_safe(req, nreq, &osd->o_linger_requests,
r_linger_osd) { r_linger_osd) {
__unregister_linger_request(osdc, req); /*
* reregister request prior to unregistering linger so
* that r_osd is preserved.
*/
BUG_ON(!list_empty(&req->r_req_lru_item));
__register_request(osdc, req); __register_request(osdc, req);
list_move(&req->r_req_lru_item, &osdc->req_unsent); list_add(&req->r_req_lru_item, &osdc->req_unsent);
list_add(&req->r_osd_item, &req->r_osd->o_requests);
__unregister_linger_request(osdc, req);
dout("requeued lingering %p tid %llu osd%d\n", req, req->r_tid, dout("requeued lingering %p tid %llu osd%d\n", req, req->r_tid,
osd->o_osd); osd->o_osd);
} }
...@@ -798,7 +804,7 @@ static void __register_request(struct ceph_osd_client *osdc, ...@@ -798,7 +804,7 @@ static void __register_request(struct ceph_osd_client *osdc,
req->r_request->hdr.tid = cpu_to_le64(req->r_tid); req->r_request->hdr.tid = cpu_to_le64(req->r_tid);
INIT_LIST_HEAD(&req->r_req_lru_item); INIT_LIST_HEAD(&req->r_req_lru_item);
dout("register_request %p tid %lld\n", req, req->r_tid); dout("__register_request %p tid %lld\n", req, req->r_tid);
__insert_request(osdc, req); __insert_request(osdc, req);
ceph_osdc_get_request(req); ceph_osdc_get_request(req);
osdc->num_requests++; osdc->num_requests++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment