svn commit: r330931 - head/sys/cam

Warner Losh imp at FreeBSD.org
Wed Mar 14 16:44:17 UTC 2018


Author: imp
Date: Wed Mar 14 16:44:16 2018
New Revision: 330931
URL: https://svnweb.freebsd.org/changeset/base/330931

Log:
  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

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==============================================================================
--- head/sys/cam/cam_iosched.c	Wed Mar 14 16:16:25 2018	(r330930)
+++ head/sys/cam/cam_iosched.c	Wed Mar 14 16:44:16 2018	(r330931)
@@ -1493,7 +1493,7 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc
 			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);


More information about the svn-src-all mailing list