svn commit: r330933 - head/sys/cam

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


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

Log:
  Fix inverted logic that counted all completions as errors, except when
  they were actual errors.
  
  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:44:50 2018	(r330932)
+++ head/sys/cam/cam_iosched.c	Wed Mar 14 16:44:57 2018	(r330933)
@@ -1473,18 +1473,18 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc
 		printf("done: %p %#x\n", bp, bp->bio_cmd);
 	if (bp->bio_cmd == BIO_WRITE) {
 		retval = cam_iosched_limiter_iodone(&isc->write_stats, bp);
-		if (!(bp->bio_flags & BIO_ERROR))
+		if ((bp->bio_flags & BIO_ERROR) != 0)
 			isc->write_stats.errs++;
 		isc->write_stats.out++;
 		isc->write_stats.pending--;
 	} else if (bp->bio_cmd == BIO_READ) {
 		retval = cam_iosched_limiter_iodone(&isc->read_stats, bp);
-		if (!(bp->bio_flags & BIO_ERROR))
+		if ((bp->bio_flags & BIO_ERROR) != 0)
 			isc->read_stats.errs++;
 		isc->read_stats.out++;
 		isc->read_stats.pending--;
 	} else if (bp->bio_cmd == BIO_DELETE) {
-		if (!(bp->bio_flags & BIO_ERROR))
+		if ((bp->bio_flags & BIO_ERROR) != 0)
 			isc->trim_stats.errs++;
 		isc->trim_stats.out++;
 		isc->trim_stats.pending--;


More information about the svn-src-head mailing list