Date: Wed, 14 Mar 2018 16:44:57 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330933 - head/sys/cam Message-ID: <201803141644.w2EGivZA046195@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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--;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803141644.w2EGivZA046195>