Index: head/sys/cam/cam_xpt.c =================================================================== --- head/sys/cam/cam_xpt.c +++ head/sys/cam/cam_xpt.c @@ -414,6 +414,10 @@ struct cam_eb *bus; inccb = (union ccb *)addr; +#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) + if (inccb->ccb_h.func_code == XPT_SCSI_IO) + inccb->csio.bio = NULL; +#endif bus = xpt_find_bus(inccb->ccb_h.path_id); if (bus == NULL) @@ -593,6 +597,10 @@ unit = ccb->cgdl.unit_number; name = ccb->cgdl.periph_name; base_periph_found = 0; +#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) + if (ccb->ccb_h.func_code == XPT_SCSI_IO) + ccb->csio.bio = NULL; +#endif /* * Sanity check -- make sure we don't get a null peripheral Index: head/sys/cam/scsi/scsi_pass.c =================================================================== --- head/sys/cam/scsi/scsi_pass.c +++ head/sys/cam/scsi/scsi_pass.c @@ -1777,6 +1777,10 @@ int ccb_malloced; inccb = (union ccb *)addr; +#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) + if (inccb->ccb_h.func_code == XPT_SCSI_IO) + inccb->csio.bio = NULL; +#endif /* * Some CCB types, like scan bus and scan lun can only go @@ -1875,6 +1879,10 @@ cam_periph_lock(periph); break; } +#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING) + if (ccb->ccb_h.func_code == XPT_SCSI_IO) + ccb->csio.bio = NULL; +#endif if (ccb->ccb_h.flags & CAM_CDB_POINTER) { if (ccb->csio.cdb_len > IOCDBLEN) {