From patchwork Tue Mar 25 13:31:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 3887831 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C1747BF540 for ; Tue, 25 Mar 2014 13:31:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D09B20256 for ; Tue, 25 Mar 2014 13:31:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88AC12021C for ; Tue, 25 Mar 2014 13:31:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752360AbaCYNbY (ORCPT ); Tue, 25 Mar 2014 09:31:24 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:36428 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbaCYNbX (ORCPT ); Tue, 25 Mar 2014 09:31:23 -0400 Received: by mail-qc0-f174.google.com with SMTP id c9so503434qcz.33 for ; Tue, 25 Mar 2014 06:31:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=jKMTCAj1glPLtkXeUJN0lb2A1okpRhrJxuIdJyd0jJA=; b=EmVifIonQQ6+kDzBuO6tWLu9vGYcPkA6260yJq2I7DRvoLVXSPhmA16kQBfIxj/GQn kgZ64OFS9eD72viIjs78jQMZ2SjCxkzQl/xH2BHgsGz3/vH7x+V5LigqueXufkqkA0kS VFCwjozjUDrO+FeTT1bQOYEbfj6q/5GOMgUFknSV6mcgvV+eXnvkd1EoECXv3VkTBquj Dl1iNvclawuFMGigfoxccviBrqFeiaBXu8SEsd/issF7YmNt+28W9uKLv/ukQBTFneeu qKwnVHY8wxYzO4mvtBX6AX1NMaKUwRhnT7RToE4hdo7TgxgJeCvwWbF9mL6LUD72Q2e4 rTFg== X-Gm-Message-State: ALoCoQk5QouXVDtZl5KUlnMYHhMEOD0xu8+DgG/xVPfsTFav0NO98UzBahUuhiB1z5bYPaLkkHeX X-Received: by 10.224.160.83 with SMTP id m19mr81423351qax.21.1395754282808; Tue, 25 Mar 2014 06:31:22 -0700 (PDT) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPSA id v75sm26943159qge.6.2014.03.25.06.31.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 06:31:22 -0700 (PDT) Message-ID: <5331853D.40408@ieee.org> Date: Tue, 25 Mar 2014 08:31:41 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Olivier Bonvalet , Ilya Dryomov CC: Ceph Development Subject: Re: Issue #5876 : assertion failure in rbd_img_obj_callback() References: <1395736765.2823.29.camel@localhost> <53316D18.7040103@ieee.org> <53317BC2.9010700@ieee.org> <1395753516.2823.37.camel@localhost> <533184AF.9050101@ieee.org> In-Reply-To: <533184AF.9050101@ieee.org> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 ... >> So, a (partial) fix can be this patch ? >> >> --- a/drivers/block/rbd.c >> +++ b/drivers/block/rbd.c >> @@ -2123,6 +2123,7 @@ static void rbd_img_obj_callback(struct rbd_obj_request *obj_request) >> rbd_assert(obj_request_img_data_test(obj_request)); >> img_request = obj_request->img_request; >> >> + spin_lock_irq(&img_request->completion_lock); >> dout("%s: img %p obj %p\n", __func__, img_request, obj_request); >> rbd_assert(img_request != NULL); >> rbd_assert(img_request->obj_request_count > 0); >> @@ -2130,7 +2131,6 @@ static void rbd_img_obj_callback(struct rbd_obj_request *obj_request) >> rbd_assert(which < img_request->obj_request_count); >> rbd_assert(which >= img_request->next_completion); >> >> - spin_lock_irq(&img_request->completion_lock); >> if (which != img_request->next_completion) >> goto out; > > > Yes, roughly. I'd do the following instead. It would be great > to learn whether it eliminates the one form of assertion failure > you were seeing. > > -Alex > Strike that, my last patch was dead wrong. Sorry. Try this: --- 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 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2128,11 +2128,11 @@ static void rbd_img_obj_callback(struct rbd_assert(img_request->obj_request_count > 0); rbd_assert(which != BAD_WHICH); rbd_assert(which < img_request->obj_request_count); - rbd_assert(which >= img_request->next_completion); spin_lock_irq(&img_request->completion_lock); - if (which != img_request->next_completion) + if (which > img_request->next_completion) goto out; + rbd_assert(which == img_request->next_completion); for_each_obj_request_from(img_request, obj_request) { rbd_assert(more);