diff options
author | gjb <gjb@FreeBSD.org> | 2016-03-10 21:16:01 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2016-03-10 21:16:01 +0000 |
commit | 1c7e318a9a31cae130bd5b2de01d93e7800f66ff (patch) | |
tree | 5abb86d0e160314526bb716fff070a6708d61844 /sys/geom/geom_disk.c | |
parent | 8c3e466633f443f8af1bf868eb74c53b39b63fb8 (diff) | |
parent | 03f8f8e39672316bbe0cad522f381fab54de0b6e (diff) | |
download | FreeBSD-src-1c7e318a9a31cae130bd5b2de01d93e7800f66ff.zip FreeBSD-src-1c7e318a9a31cae130bd5b2de01d93e7800f66ff.tar.gz |
MFH
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r-- | sys/geom/geom_disk.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index afd1fde..d503f67 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -225,8 +225,16 @@ g_disk_done(struct bio *bp) if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; - if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE|BIO_FLUSH)) != 0) + switch (bp->bio_cmd) { + case BIO_READ: + case BIO_WRITE: + case BIO_DELETE: + case BIO_FLUSH: devstat_end_transaction_bio_bt(sc->dp->d_devstat, bp, &now); + break; + default: + break; + } bp2->bio_inbed++; if (bp2->bio_children == bp2->bio_inbed) { mtx_unlock(&sc->done_mtx); |