git: 0040d1fb7a25 - main - cam: Rename cam_iosched_bio_complete to cam_iosched_bio_update_stats

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 06 Oct 2026 22:58:48 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=0040d1fb7a251daa0690f4858ddb495bee79ae52

commit 0040d1fb7a251daa0690f4858ddb495bee79ae52
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2026-10-06 22:45:31 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-10-06 22:46:22 +0000

    cam: Rename cam_iosched_bio_complete to cam_iosched_bio_update_stats
    
    The function updates scheduler statistics but does not complete the
    bio. Rename it to avoid implying ownership of bio completion.
    
    Sponsored by:           Netflix
    
    Reviewed by:    ali_mashtizadeh.com
    Differential Revision:  https://reviews.freebsd.org/D60349
---
 sys/cam/ata/ata_da.c   | 2 +-
 sys/cam/cam_iosched.c  | 2 +-
 sys/cam/cam_iosched.h  | 2 +-
 sys/cam/nvme/nvme_da.c | 6 +++---
 sys/cam/scsi/scsi_da.c | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 76f8e26e43ae..9a088cc74337 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -3010,7 +3010,7 @@ adadone(struct cam_periph *periph, union ccb *done_ccb)
 		 * extensive.  Release the periph refcount taken in adastart()
 		 * for each CCB.
 		 */
-		cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
+		cam_iosched_bio_update_stats(softc->cam_iosched, bp, done_ccb);
 		xpt_release_ccb(done_ccb);
 		KASSERT(softc->refcount >= 1, ("adadone softc %p refcount %d", softc, softc->refcount));
 		softc->refcount--;
diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c
index a7b7eb3cc4e9..e807301c6302 100644
--- a/sys/cam/cam_iosched.c
+++ b/sys/cam/cam_iosched.c
@@ -1771,7 +1771,7 @@ cam_iosched_trim_done(struct cam_iosched_softc *isc)
  * might use notes in the ccb for statistics.
  */
 int
-cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp,
+cam_iosched_bio_update_stats(struct cam_iosched_softc *isc, struct bio *bp,
     union ccb *done_ccb)
 {
 	int retval = 0;
diff --git a/sys/cam/cam_iosched.h b/sys/cam/cam_iosched.h
index 54f9a7c02a25..cbe6a20fb871 100644
--- a/sys/cam/cam_iosched.h
+++ b/sys/cam/cam_iosched.h
@@ -99,7 +99,7 @@ int cam_iosched_has_work_flags(struct cam_iosched_softc *isc, uint32_t flags);
 void cam_iosched_set_work_flags(struct cam_iosched_softc *isc, uint32_t flags);
 void cam_iosched_clr_work_flags(struct cam_iosched_softc *isc, uint32_t flags);
 void cam_iosched_trim_done(struct cam_iosched_softc *isc);
-int cam_iosched_bio_complete(struct cam_iosched_softc *isc, struct bio *bp, union ccb *done_ccb);
+int cam_iosched_bio_update_stats(struct cam_iosched_softc *isc, struct bio *bp, union ccb *done_ccb);
 void cam_iosched_set_latfcn(struct cam_iosched_softc *isc, cam_iosched_latfcn_t, void *);
 void cam_iosched_set_trim_goal(struct cam_iosched_softc *isc, int goal);
 void cam_iosched_set_trim_ticks(struct cam_iosched_softc *isc, int ticks);
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
index e1831331f8f3..fe5c87c5428a 100644
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -1322,7 +1322,7 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb)
 			 * routine, which in the case of sendfile can be quite
 			 * extensive.
 			 */
-			cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
+			cam_iosched_bio_update_stats(softc->cam_iosched, bp, done_ccb);
 			xpt_release_ccb(done_ccb);
 			ndaschedule(periph);
 			cam_periph_unlock(periph);
@@ -1349,7 +1349,7 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb)
 			 * so we can keep proper counts.
 			 */
 			bp1 = TAILQ_FIRST(&queue);
-			cam_iosched_bio_complete(softc->cam_iosched, bp1, done_ccb);
+			cam_iosched_bio_update_stats(softc->cam_iosched, bp1, done_ccb);
 			xpt_release_ccb(done_ccb);
 			softc->outstanding_cmds--;
 			ndaschedule(periph);
@@ -1363,7 +1363,7 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb)
 				} else
 					bp2->bio_resid = 0;
 				if (bp1 != bp2)
-					cam_iosched_bio_complete(softc->cam_iosched, bp2, NULL);
+					cam_iosched_bio_update_stats(softc->cam_iosched, bp2, NULL);
 				biodone(bp2);
 			}
 		}
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 9a52ee96fa80..04f924c7a91e 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -4788,7 +4788,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
 	 * the case of sendfile can be quite extensive. Release the periph
 	 * refcount taken in dastart() for each CCB.
 	 */
-	cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
+	cam_iosched_bio_update_stats(softc->cam_iosched, bp, done_ccb);
 	xpt_release_ccb(done_ccb);
 	KASSERT(softc->refcount >= 1, ("dadone softc %p refcount %d", softc, softc->refcount));
 	softc->refcount--;