Commit 10c2b4aa authored by Ilya Dryomov's avatar Ilya Dryomov Committed by Kamal Mostafa

libceph: assert both regular and lingering lists in __remove_osd()

commit 7c6e6fc5 upstream.

It is important that both regular and lingering requests lists are
empty when the OSD is removed.
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 8ac96be7
...@@ -976,6 +976,8 @@ static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) ...@@ -976,6 +976,8 @@ static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd)
{ {
dout("__remove_osd %p\n", osd); dout("__remove_osd %p\n", osd);
BUG_ON(!list_empty(&osd->o_requests)); BUG_ON(!list_empty(&osd->o_requests));
BUG_ON(!list_empty(&osd->o_linger_requests));
rb_erase(&osd->o_node, &osdc->osds); rb_erase(&osd->o_node, &osdc->osds);
list_del_init(&osd->o_osd_lru); list_del_init(&osd->o_osd_lru);
ceph_con_close(&osd->o_con); ceph_con_close(&osd->o_con);
......
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