Allow NULL ccb to cam_iosched_bio_complete
When the ccb is NULL to cam_iosched_bio_complete, just update the other statistics, but not the time. If many operations are collapsed together, this is needed to keep stats properly for the grouped bp. This should fix trim accounting. Sponsored by: Netflix
This commit is contained in:
parent
8d10093050
commit
bfff519b42
@ -1493,7 +1493,7 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp,
|
||||
printf("Completing command with bio_cmd == %#x\n", bp->bio_cmd);
|
||||
}
|
||||
|
||||
if (!(bp->bio_flags & BIO_ERROR))
|
||||
if (!(bp->bio_flags & BIO_ERROR) && done_ccb != NULL)
|
||||
cam_iosched_io_metric_update(isc,
|
||||
cam_iosched_sbintime_t(done_ccb->ccb_h.qos.periph_data),
|
||||
bp->bio_cmd, bp->bio_bcount);
|
||||
|
Loading…
Reference in New Issue
Block a user