All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] lightnvm: warn if irqs are disabled in lock laddr
@ 2016-02-01 10:34 Javier González
  2016-02-01 10:34 ` [PATCH 2/2] lightnvm: fix request intersection locking in rrpc Javier González
  2016-02-03  8:54 ` [PATCH 1/2] lightnvm: warn if irqs are disabled in lock laddr Matias Bjørling
  0 siblings, 2 replies; 4+ messages in thread
From: Javier González @ 2016-02-01 10:34 UTC (permalink / raw)
  To: mb; +Cc: linux-kernel, linux-block, 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 <javier@cnexlabs.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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-03  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 10:34 [PATCH 1/2] lightnvm: warn if irqs are disabled in lock laddr Javier González
2016-02-01 10:34 ` [PATCH 2/2] lightnvm: fix request intersection locking in rrpc Javier González
2016-02-03  8:53   ` Matias Bjørling
2016-02-03  8:54 ` [PATCH 1/2] lightnvm: warn if irqs are disabled in lock laddr Matias Bjørling

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.