All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matias Bjørling" <m@bjorling.me>
To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com
Cc: "Javier González" <jg@lightnvm.io>,
	"Javier González" <javier@cnexlabs.com>,
	"Matias Bjørling" <m@bjorling.me>
Subject: [PATCH 2/5] lightnvm: warn if irqs are disabled in lock laddr
Date: Thu,  4 Feb 2016 15:13:24 +0100	[thread overview]
Message-ID: <1454595207-22432-3-git-send-email-m@bjorling.me> (raw)
In-Reply-To: <1454595207-22432-1-git-send-email-m@bjorling.me>

From: Javier González <jg@lightnvm.io>

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 <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
 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))) {
-- 
2.1.4

  parent reply	other threads:[~2016-02-04 14:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 14:13 [PATCH v2 0/5] LightNVM updates for next 4.5-rc Matias Bjørling
2016-02-04 14:13 ` [PATCH 1/5] lightnvm: put bio before return Matias Bjørling
2016-02-04 14:13 ` Matias Bjørling [this message]
2016-02-04 14:13 ` [PATCH 3/5] lightnvm: fix request intersection locking in rrpc Matias Bjørling
2016-02-04 14:13 ` [PATCH 4/5] lightnvm: check overflow and correct mlc pairs Matias Bjørling
2016-02-04 14:13 ` [PATCH 5/5] lightnvm: allow to force mm initialization Matias Bjørling
2016-02-04 16:20 ` [PATCH v2 0/5] LightNVM updates for next 4.5-rc Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2016-02-04 13:57 [PATCH " Matias Bjørling
2016-02-04 13:57 ` [PATCH 2/5] lightnvm: warn if irqs are disabled in lock laddr Matias Bjørling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454595207-22432-3-git-send-email-m@bjorling.me \
    --to=m@bjorling.me \
    --cc=axboe@fb.com \
    --cc=javier@cnexlabs.com \
    --cc=jg@lightnvm.io \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.