From patchwork Wed Jun 25 17:16:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 4422381 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 470899F1D6 for ; Wed, 25 Jun 2014 17:17:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 894D420394 for ; Wed, 25 Jun 2014 17:17:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B834D2038D for ; Wed, 25 Jun 2014 17:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757623AbaFYRRI (ORCPT ); Wed, 25 Jun 2014 13:17:08 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:37236 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757311AbaFYRRG (ORCPT ); Wed, 25 Jun 2014 13:17:06 -0400 Received: by mail-lb0-f171.google.com with SMTP id s7so2096575lbd.30 for ; Wed, 25 Jun 2014 10:17:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=w/Lw2RUm8gxFDWkXY0FZePJ7ch6FAh3938zRSKt8Pew=; b=WvML35eSTT5ODzise7srSe1MDFqYEYxyI+JoJGoUc3gx75h3zMnnC16QuBgjXqsC5e OcOYv2XlWBaMTF/KsZZCDDAzNFr7nTA5TY37dKN+ytXyo613EEZhsrMNOZAI1xRcW9gW lKg2omqly57uDTKtO6/lOoc+VvDde7EJxhLsrC0gvPZ7ZZxrB/St4DG6LNLHahvDznG1 apvLJ249+jQ7M6PaVtBlG0EtcUZ9x8CGNIPGhx826aSAf2uTAMrxJSrAumJRVUQb56IT WMyfCPBehoHBUDSSWlZ0rj5JyDNpe3+5n1xSoK6puCkUohIynN5S5SmkiFL/V2b6WRP7 75uQ== X-Gm-Message-State: ALoCoQnICenVUL9jUvelWH+ATnoF13oktSiNzWoHFMbjInIc0TCaPLlPUl+wpmR79LnH9VDLrFNb X-Received: by 10.112.188.165 with SMTP id gb5mr2681757lbc.69.1403716625391; Wed, 25 Jun 2014 10:17:05 -0700 (PDT) Received: from localhost ([109.110.67.53]) by mx.google.com with ESMTPSA id pp8sm4226985lbb.4.2014.06.25.10.17.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Jun 2014 10:17:04 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH 06/14] libceph: assert both regular and lingering lists in __remove_osd() Date: Wed, 25 Jun 2014 21:16:39 +0400 Message-Id: <1403716607-13535-7-git-send-email-ilya.dryomov@inktank.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403716607-13535-1-git-send-email-ilya.dryomov@inktank.com> References: <1403716607-13535-1-git-send-email-ilya.dryomov@inktank.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is important that both regular and lingering requests lists are empty when the OSD is removed. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- 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);