Add a couple of strategic KASSERTs

This commit is contained in:
Poul-Henning Kamp 1999-10-08 19:07:23 +00:00
parent 90fce79ecd
commit 1201869007
2 changed files with 12 additions and 0 deletions

View File

@ -677,6 +677,12 @@ spec_strategy(ap)
if (((bp->b_flags & B_READ) == 0) &&
(LIST_FIRST(&bp->b_dep)) != NULL && bioops.io_start)
(*bioops.io_start)(bp);
KASSERT(devsw(bp->b_dev) != NULL,
("No devsw on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
KASSERT(devsw(bp->b_dev)->d_strategy != NULL,
("No strategy on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
BUF_STRATEGY(bp, 0);
return (0);
}

View File

@ -677,6 +677,12 @@ spec_strategy(ap)
if (((bp->b_flags & B_READ) == 0) &&
(LIST_FIRST(&bp->b_dep)) != NULL && bioops.io_start)
(*bioops.io_start)(bp);
KASSERT(devsw(bp->b_dev) != NULL,
("No devsw on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
KASSERT(devsw(bp->b_dev)->d_strategy != NULL,
("No strategy on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
BUF_STRATEGY(bp, 0);
return (0);
}