| 351 | } |
| 352 | |
| 353 | void |
| 354 | devstat_end_transaction_bio_bt(struct devstat *ds, const struct bio *bp, |
| 355 | const struct bintime *now) |
| 356 | { |
| 357 | devstat_trans_flags flg; |
| 358 | devstat_tag_type tag; |
| 359 | |
| 360 | /* sanity check */ |
| 361 | if (ds == NULL) |
| 362 | return; |
| 363 | |
| 364 | if (bp->bio_flags & BIO_ORDERED) |
| 365 | tag = DEVSTAT_TAG_ORDERED; |
| 366 | else |
| 367 | tag = DEVSTAT_TAG_SIMPLE; |
| 368 | if (bp->bio_cmd == BIO_DELETE) |
| 369 | flg = DEVSTAT_FREE; |
| 370 | else if ((bp->bio_cmd == BIO_READ) |
| 371 | || ((bp->bio_cmd == BIO_ZONE) |
| 372 | && (bp->bio_zone.zone_cmd == DISK_ZONE_REPORT_ZONES))) |
| 373 | flg = DEVSTAT_READ; |
| 374 | else if (bp->bio_cmd == BIO_WRITE) |
| 375 | flg = DEVSTAT_WRITE; |
| 376 | else |
| 377 | flg = DEVSTAT_NO_DATA; |
| 378 | |
| 379 | devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid, |
| 380 | tag, flg, now, &bp->bio_t0); |
| 381 | DTRACE_DEVSTAT_BIO_DONE(); |
| 382 | } |
| 383 | |
| 384 | /* |
| 385 | * This is the sysctl handler for the devstat package. The data pushed out |
no test coverage detected