aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-14 22:02:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-14 22:02:55 -0400
commite6d28318344535331d9473548b210dd267fe7b7e (patch)
tree90a4c7dab77900ec531b73151503b4b2e00132d1 /net
parente27e6151b154ff6e5e8162efa291bc60196d29ea (diff)
parent77f38e0eeac290827f41fd2215ab82546b8f73b8 (diff)
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
Diffstat (limited to 'net')
-rw-r--r--net/ceph/osd_client.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 50af02737a3d..5a80f41c0cba 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -579,9 +579,15 @@ static void __kick_osd_requests(struct ceph_osd_client *osdc,
579 579
580 list_for_each_entry_safe(req, nreq, &osd->o_linger_requests, 580 list_for_each_entry_safe(req, nreq, &osd->o_linger_requests,
581 r_linger_osd) { 581 r_linger_osd) {
582 __unregister_linger_request(osdc, req); 582 /*
583 * reregister request prior to unregistering linger so
584 * that r_osd is preserved.
585 */
586 BUG_ON(!list_empty(&req->r_req_lru_item));
583 __register_request(osdc, req); 587 __register_request(osdc, req);
584 list_move(&req->r_req_lru_item, &osdc->req_unsent); 588 list_add(&req->r_req_lru_item, &osdc->req_unsent);
589 list_add(&req->r_osd_item, &req->r_osd->o_requests);
590 __unregister_linger_request(osdc, req);
585 dout("requeued lingering %p tid %llu osd%d\n", req, req->r_tid, 591 dout("requeued lingering %p tid %llu osd%d\n", req, req->r_tid,
586 osd->o_osd); 592 osd->o_osd);
587 } 593 }
@@ -798,7 +804,7 @@ static void __register_request(struct ceph_osd_client *osdc,
798 req->r_request->hdr.tid = cpu_to_le64(req->r_tid); 804 req->r_request->hdr.tid = cpu_to_le64(req->r_tid);
799 INIT_LIST_HEAD(&req->r_req_lru_item); 805 INIT_LIST_HEAD(&req->r_req_lru_item);
800 806
801 dout("register_request %p tid %lld\n", req, req->r_tid); 807 dout("__register_request %p tid %lld\n", req, req->r_tid);
802 __insert_request(osdc, req); 808 __insert_request(osdc, req);
803 ceph_osdc_get_request(req); 809 ceph_osdc_get_request(req);
804 osdc->num_requests++; 810 osdc->num_requests++;