From patchwork Thu Feb 4 14:13:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 8222361 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4C1DCBEEE5 for ; Thu, 4 Feb 2016 14:16:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6EFE220395 for ; Thu, 4 Feb 2016 14:16:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D8F92038F for ; Thu, 4 Feb 2016 14:16:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932805AbcBDOQR (ORCPT ); Thu, 4 Feb 2016 09:16:17 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37796 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965067AbcBDONj (ORCPT ); Thu, 4 Feb 2016 09:13:39 -0500 Received: by mail-wm0-f46.google.com with SMTP id g62so6359919wme.0 for ; Thu, 04 Feb 2016 06:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=9ugyZZsWr2/a4JIczJRyjoWcD4/l9XQWDSrdH5muTNM=; b=vmpgiPhlcAXVWAjjRyuy1UbNm/YyNfwmqf2yKQ+u4LARo3b75uZMQMOSnWwbijMCK/ VYPo4gTJm2kb5Lhrcy0M6ixOUhRQUHJ0HfzwacOXBeZm6mtXemkMZJqAzsi0pbKbcwpu AL4cxjGyaIQdQ/z1iuIVmfvlML+dGs57K3rDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=9ugyZZsWr2/a4JIczJRyjoWcD4/l9XQWDSrdH5muTNM=; b=A2hxMxcny9CYUVG9AxsPxxkZLvQyAcI+XsNXIDxt3kRUv8q7CICCXgaVsem4yBX1UF rR4A+hHsOkUT59zRxwsek80R6NbFi5kuDZ9XTEn/Q4VFh9BOa4wHgqCKS5me8G23ylqy 0nESRB2nKO1Pa/hfsSWrkN69Hh7ng4OySsZHJPOBQtMZkWPwnLGb0j48MsOCwVa8AOqo s2D4cT/9ped9AwBAyLq7/j/BQcvh4Jj6Y2FLy1zt97Ty0PG6inK/tKVV1bKsfCBEIXSs +ZR9tTZleWa9hUv9e/xj6qMggylMd3g/fIIXEIZgSU0qg+a3Qj135SG8dFR387x2pgbK U7JA== X-Gm-Message-State: AG10YOQtZaHu9qqwlgAnr5EiZu8XEVirdIAYbAQBX7Qx8gDDREl8ypOUkedBf93w4hpdYQ== X-Received: by 10.194.187.240 with SMTP id fv16mr8317875wjc.39.1454595217889; Thu, 04 Feb 2016 06:13:37 -0800 (PST) Received: from localhost.localdomain (6164198-cl69.boa.fiberby.dk. [193.106.164.198]) by smtp.gmail.com with ESMTPSA id u130sm26390332wmg.15.2016.02.04.06.13.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Feb 2016 06:13:37 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 2/5] lightnvm: warn if irqs are disabled in lock laddr Date: Thu, 4 Feb 2016 15:13:24 +0100 Message-Id: <1454595207-22432-3-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454595207-22432-1-git-send-email-m@bjorling.me> References: <1454595207-22432-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 From: Javier González Add a warning if irqs are disabled when locking a new address in rrpc. The typical path to a new request does not disable irqs, but this is not guaranteed in the future. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/rrpc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h index dfca5c4..c27283a 100644 --- a/drivers/lightnvm/rrpc.h +++ b/drivers/lightnvm/rrpc.h @@ -184,6 +184,8 @@ static int __rrpc_lock_laddr(struct rrpc *rrpc, sector_t laddr, sector_t laddr_end = laddr + pages - 1; struct rrpc_inflight_rq *rtmp; + WARN_ON(irqs_disabled()); + spin_lock_irq(&rrpc->inflights.lock); list_for_each_entry(rtmp, &rrpc->inflights.reqs, list) { if (unlikely(request_intersects(rtmp, laddr, laddr_end))) {