From patchwork Fri Jun 20 09:09:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 4387431 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 D5E3D9F314 for ; Fri, 20 Jun 2014 09:09:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1093020306 for ; Fri, 20 Jun 2014 09:09:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0D28202AE for ; Fri, 20 Jun 2014 09:09:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965225AbaFTJJv (ORCPT ); Fri, 20 Jun 2014 05:09:51 -0400 Received: from mail-la0-f43.google.com ([209.85.215.43]:42301 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754552AbaFTJJu (ORCPT ); Fri, 20 Jun 2014 05:09:50 -0400 Received: by mail-la0-f43.google.com with SMTP id e16so2214271lan.30 for ; Fri, 20 Jun 2014 02:09:49 -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=hG76Ly+XpoUR+1TFlLDtPiOmhR1eAN7jAO1tIVq6b3w=; b=jz951dL+T2ryf/kxVDsU9Rs3/isCxRjrmkUflWEvP5Hm+U5myMqcBmUfMxN7ezL9ki WFE1paYYodl97yLXGTjWs5wY4nGAjwQmoMMZ08CEH8mKGs2kAe1P4hVdjCPFLpbgImRK QHCwFEd1O7GqHcAOpy7LuXUH0gTPPD11022j0IfxD1erfHoTknpIQ9Z3fc1MTszj5/5s W3F7Tlq+TK5z5B4NgNfh6C+9Axy5zAMX8q9gNnzL+Bmx+/Qo+Gh6QFjL9uoidi74REkX udQYRv+Rhy396HjHrCsMm4JwIGA5SCXttlvX4h/TquireClofCrAwTxP9HYyUPBEFccT Nthg== X-Gm-Message-State: ALoCoQmF/6B4zPqG5bOU2X8Za/7ujRhAkTbXOFVRBrDcVMkOyn0R0H8diOaDXcVhtH0/nIaS6jr6 X-Received: by 10.112.155.129 with SMTP id vw1mr1579861lbb.7.1403255388983; Fri, 20 Jun 2014 02:09:48 -0700 (PDT) Received: from localhost ([109.110.66.173]) by mx.google.com with ESMTPSA id of9sm6153072lbb.4.2014.06.20.02.09.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 20 Jun 2014 02:09:48 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH 1/4] libceph: assert both regular and lingering lists in __remove_osd() Date: Fri, 20 Jun 2014 13:09:40 +0400 Message-Id: <1403255383-5729-2-git-send-email-ilya.dryomov@inktank.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403255383-5729-1-git-send-email-ilya.dryomov@inktank.com> References: <1403255383-5729-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: --- net/ceph/osd_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index b0dfce77656a..6b8c5e8c49ce 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -1007,7 +1007,8 @@ static void put_osd(struct ceph_osd *osd) 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_requests) || + !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);