Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull two Ceph fixes from Sage Weil: "These fix an issue with the RBD notifications when there are topology changes in the cluster" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: Revert "libceph: clear r_req_lru_item in __unregister_linger_request()" libceph: request a new osdmap if lingering request maps to no osd
This commit is contained in:
commit
086e8ddb56
1 changed files with 20 additions and 13 deletions
|
@ -1306,8 +1306,6 @@ static void __unregister_linger_request(struct ceph_osd_client *osdc,
|
||||||
if (list_empty(&req->r_osd_item))
|
if (list_empty(&req->r_osd_item))
|
||||||
req->r_osd = NULL;
|
req->r_osd = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
list_del_init(&req->r_req_lru_item); /* can be on notarget */
|
|
||||||
ceph_osdc_put_request(req);
|
ceph_osdc_put_request(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2017,20 +2015,29 @@ static void kick_requests(struct ceph_osd_client *osdc, bool force_resend,
|
||||||
err = __map_request(osdc, req,
|
err = __map_request(osdc, req,
|
||||||
force_resend || force_resend_writes);
|
force_resend || force_resend_writes);
|
||||||
dout("__map_request returned %d\n", err);
|
dout("__map_request returned %d\n", err);
|
||||||
if (err == 0)
|
|
||||||
continue; /* no change and no osd was specified */
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
continue; /* hrm! */
|
continue; /* hrm! */
|
||||||
if (req->r_osd == NULL) {
|
if (req->r_osd == NULL || err > 0) {
|
||||||
dout("tid %llu maps to no valid osd\n", req->r_tid);
|
if (req->r_osd == NULL) {
|
||||||
needmap++; /* request a newer map */
|
dout("lingering %p tid %llu maps to no osd\n",
|
||||||
continue;
|
req, req->r_tid);
|
||||||
}
|
/*
|
||||||
|
* A homeless lingering request makes
|
||||||
|
* no sense, as it's job is to keep
|
||||||
|
* a particular OSD connection open.
|
||||||
|
* Request a newer map and kick the
|
||||||
|
* request, knowing that it won't be
|
||||||
|
* resent until we actually get a map
|
||||||
|
* that can tell us where to send it.
|
||||||
|
*/
|
||||||
|
needmap++;
|
||||||
|
}
|
||||||
|
|
||||||
dout("kicking lingering %p tid %llu osd%d\n", req, req->r_tid,
|
dout("kicking lingering %p tid %llu osd%d\n", req,
|
||||||
req->r_osd ? req->r_osd->o_osd : -1);
|
req->r_tid, req->r_osd ? req->r_osd->o_osd : -1);
|
||||||
__register_request(osdc, req);
|
__register_request(osdc, req);
|
||||||
__unregister_linger_request(osdc, req);
|
__unregister_linger_request(osdc, req);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
reset_changed_osds(osdc);
|
reset_changed_osds(osdc);
|
||||||
mutex_unlock(&osdc->request_mutex);
|
mutex_unlock(&osdc->request_mutex);
|
||||||
|
|
Loading…
Add table
Reference in a new issue