diff mbox

[06/14] libceph: assert both regular and lingering lists in __remove_osd()

Message ID 1403716607-13535-7-git-send-email-ilya.dryomov@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ilya Dryomov June 25, 2014, 5:16 p.m. UTC
It is important that both regular and lingering requests lists are
empty when the OSD is removed.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
---
 net/ceph/osd_client.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Alex Elder June 30, 2014, 12:37 p.m. UTC | #1
On 06/25/2014 12:16 PM, Ilya Dryomov wrote:
> It is important that both regular and lingering requests lists are
> empty when the OSD is removed.

Looks good.

Reviewed-by: Alex Elder <elder@linaro.org>

> 
> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
> ---
>  net/ceph/osd_client.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
> index 052eb8bfcc74..a9b7ea7bfdc6 100644
> --- a/net/ceph/osd_client.c
> +++ b/net/ceph/osd_client.c
> @@ -1032,6 +1032,8 @@ static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd)
>  {
>  	dout("__remove_osd %p\n", osd);
>  	BUG_ON(!list_empty(&osd->o_requests));
> +	BUG_ON(!list_empty(&osd->o_linger_requests));
> +
>  	rb_erase(&osd->o_node, &osdc->osds);
>  	list_del_init(&osd->o_osd_lru);
>  	ceph_con_close(&osd->o_con);
> 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 052eb8bfcc74..a9b7ea7bfdc6 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1032,6 +1032,8 @@  static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd)
 {
 	dout("__remove_osd %p\n", osd);
 	BUG_ON(!list_empty(&osd->o_requests));
+	BUG_ON(!list_empty(&osd->o_linger_requests));
+
 	rb_erase(&osd->o_node, &osdc->osds);
 	list_del_init(&osd->o_osd_lru);
 	ceph_con_close(&osd->o_con);