memset(ipo, 0, sizeof(*ipo));
INIT_LIST_HEAD(&ipo->list);
- ipo->offset = offset;
+ /*
+ * the 512 is wrong here, it should be the hardware sector size...
+ */
+ ipo->offset = offset * 512;
ipo->len = bytes;
ipo->delay = ttime / 1000;
if (rw)
if ((t->action & 0xffff) != __BLK_TA_QUEUE)
return;
+ if (t->action & BLK_TC_ACT(BLK_TC_PC))
+ return;
+
+ /*
+ * should not happen, need to look into that...
+ */
+ if (!t->bytes)
+ return;
rw = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0;
ios[rw]++;