[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454594228-18970-3-git-send-email-m@bjorling.me>
Date: Thu, 4 Feb 2016 14:57:05 +0100
From: Matias Bjørling <m@...rling.me>
To: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
axboe@...com
Cc: Javier González <jg@...htnvm.io>,
Javier González <javier@...xlabs.com>
Subject: [PATCH 2/5] lightnvm: warn if irqs are disabled in lock laddr
From: Javier González <jg@...htnvm.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@...xlabs.com>
---
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
Powered by blists - more mailing lists