Index: head/sys/geom/sched/g_sched.c =================================================================== --- head/sys/geom/sched/g_sched.c +++ head/sys/geom/sched/g_sched.c @@ -269,7 +269,7 @@ me.gs_done++; me.gs_in_flight--; me.gs_bytes_in_flight -= bio->bio_length; - if (bio->bio_cmd & BIO_WRITE) { + if (bio->bio_cmd == BIO_WRITE) { me.gs_writes_in_flight--; me.gs_write_bytes_in_flight -= bio->bio_length; } @@ -754,9 +754,9 @@ g_sched_type(struct bio *bp) { - if (0 != (bp->bio_cmd & BIO_READ)) + if (bp->bio_cmd == BIO_READ) return ('R'); - else if (0 != (bp->bio_cmd & BIO_WRITE)) + else if (bp->bio_cmd == BIO_WRITE) return ('W'); return ('U'); } @@ -829,7 +829,7 @@ KASSERT(cbp->bio_to != NULL, ("NULL provider")); /* We only schedule reads and writes. */ - if (0 == (bp->bio_cmd & (BIO_READ | BIO_WRITE))) + if (bp->bio_cmd != BIO_READ && bp->bio_cmd != BIO_WRITE) goto bypass; G_SCHED_LOGREQ(cbp, "Sending request."); @@ -860,7 +860,7 @@ me.gs_in_flight++; me.gs_requests++; me.gs_bytes_in_flight += bp->bio_length; - if (bp->bio_cmd & BIO_WRITE) { + if (bp->bio_cmd == BIO_WRITE) { me.gs_writes_in_flight++; me.gs_write_bytes_in_flight += bp->bio_length; } Index: head/sys/geom/sched/gs_rr.c =================================================================== --- head/sys/geom/sched/gs_rr.c +++ head/sys/geom/sched/gs_rr.c @@ -375,7 +375,7 @@ { int wait = get_bounded(&me.wait_ms, 2); - if (!me.w_anticipate && (bp->bio_cmd & BIO_WRITE)) + if (!me.w_anticipate && (bp->bio_cmd == BIO_WRITE)) return (0); if (g_savg_valid(&qp->q_thinktime) &&