Skip to content

Commit

Permalink
MFC r355457: Make devstat_end_transaction_bio() count BIO_ORDERED.
Browse files Browse the repository at this point in the history
  • Loading branch information
amotin committed Dec 20, 2019
1 parent 013e44c commit ca046cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sys/kern/subr_devstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,16 @@ devstat_end_transaction_bio_bt(struct devstat *ds, const struct bio *bp,
const struct bintime *now)
{
devstat_trans_flags flg;
devstat_tag_type tag;

/* sanity check */
if (ds == NULL)
return;

if (bp->bio_flags & BIO_ORDERED)
tag = DEVSTAT_TAG_ORDERED;
else
tag = DEVSTAT_TAG_SIMPLE;
if (bp->bio_cmd == BIO_DELETE)
flg = DEVSTAT_FREE;
else if ((bp->bio_cmd == BIO_READ)
Expand All @@ -366,7 +371,7 @@ devstat_end_transaction_bio_bt(struct devstat *ds, const struct bio *bp,
flg = DEVSTAT_NO_DATA;

devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid,
DEVSTAT_TAG_SIMPLE, flg, now, &bp->bio_t0);
tag, flg, now, &bp->bio_t0);
DTRACE_DEVSTAT_BIO_DONE();
}

Expand Down

0 comments on commit ca046cb

Please sign in to comment.