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
This commit is contained in:
Warner Losh committed 2026-10-06 16:46:22 -06:00
1 parent e3f5a83b8f
commit 0040d1fb7a
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -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--;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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);
}
}
+1 -1
View File
@@ -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--;