log_generic(pci, t, "S");
break;
case __BLK_TA_REQUEUE:
- pdi->cur_depth[w]--;
+ /*
+ * can happen if we miss traces, don't let it go
+ * below zero
+ */
+ if (pdi->cur_depth[w])
+ pdi->cur_depth[w]--;
account_requeue(t, pci, w);
log_queue(pci, t, "R");
break;
log_issue(pdi, pci, t, "D");
break;
case __BLK_TA_COMPLETE:
- pdi->cur_depth[w]--;
+ if (pdi->cur_depth[w])
+ pdi->cur_depth[w]--;
account_c(t, pci, w, t->bytes);
log_complete(pdi, pci, t, "C");
break;