Commit bba7f40a authored by Javier González's avatar Javier González Committed by Jens Axboe

lightnvm: warn if irqs are disabled in lock laddr

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: default avatarJavier González <javier@cnexlabs.com>
Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 16c6d048
...@@ -184,6 +184,8 @@ static int __rrpc_lock_laddr(struct rrpc *rrpc, sector_t laddr, ...@@ -184,6 +184,8 @@ static int __rrpc_lock_laddr(struct rrpc *rrpc, sector_t laddr,
sector_t laddr_end = laddr + pages - 1; sector_t laddr_end = laddr + pages - 1;
struct rrpc_inflight_rq *rtmp; struct rrpc_inflight_rq *rtmp;
WARN_ON(irqs_disabled());
spin_lock_irq(&rrpc->inflights.lock); spin_lock_irq(&rrpc->inflights.lock);
list_for_each_entry(rtmp, &rrpc->inflights.reqs, list) { list_for_each_entry(rtmp, &rrpc->inflights.reqs, list) {
if (unlikely(request_intersects(rtmp, laddr, laddr_end))) { if (unlikely(request_intersects(rtmp, laddr, laddr_end))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment