View | Details | Raw Unified | Return to bug 221952
Collapse All | Expand All

(-)b/sys/cam/cam_iosched.c (-3 / +9 lines)
Lines 1420-1427 cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, Link Here
1420
		isc->read_stats.out++;
1420
		isc->read_stats.out++;
1421
		isc->read_stats.pending--;
1421
		isc->read_stats.pending--;
1422
	} else if (bp->bio_cmd == BIO_DELETE) {
1422
	} else if (bp->bio_cmd == BIO_DELETE) {
1423
		isc->trim_stats.out++;
1423
		/*
1424
		isc->trim_stats.pending--;
1424
		 * A single request sent to the disk may trim multiple
1425
		 * areas that belong to different BIO_DELETE requests.
1426
		 * We only sent one trim request to the disk at the time,
1427
		 * when it completes all pending BIO_DELETEs are done and
1428
		 * have to be counted as such.
1429
		 */
1430
		isc->trim_stats.out += isc->trim_stats.pending;
1431
		isc->trim_stats.pending = 0;
1425
	} else if (bp->bio_cmd != BIO_FLUSH) {
1432
	} else if (bp->bio_cmd != BIO_FLUSH) {
1426
		if (iosched_debug)
1433
		if (iosched_debug)
1427
			printf("Completing command with bio_cmd == %#x\n", bp->bio_cmd);
1434
			printf("Completing command with bio_cmd == %#x\n", bp->bio_cmd);
1428
- 

Return to bug 221952