FreeBSD/sys/cam/scsi/scsi_da.c
/*
 * Actually translate the requested transfer into one the physical driver
 * can understand.  The transfer is described by a buf and will include
 * only one physical transfer.
 */
Actually translate the requested transfer into one the physical driver
can understand.  The transfer is described by a buf and will include
only one physical transfer.
Actually translate the requested transfer into one the physical driver can understand . The transfer is described by a buf and will include only one physical transfer .
static void
dastrategy(struct bio *bp)
{
	struct cam_periph *periph;
	struct da_softc *softc;
	periph = (struct cam_periph *)bp->bio_disk->d_drv1;
	softc = (struct da_softc *)periph->softc;
	cam_periph_lock(periph);
	if ((softc->flags & DA_FLAG_PACK_INVALID)) {
		cam_periph_unlock(periph);
		biofinish(bp, NULL, ENXIO);
		return;
	}
	CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dastrategy(%p)\n", bp));
	if (bp->bio_cmd == BIO_ZONE)
		bp->bio_flags |= BIO_ORDERED;
	cam_iosched_queue_work(softc->cam_iosched, bp);
	daschedule(periph);
	cam_periph_unlock(periph);
	return;
}
static void dastrategy ( struct bio * bp ) { struct cam_periph * periph ; struct da_softc * softc ; periph = ( struct cam_periph * ) bp -> bio_disk -> d_drv1 ; softc = ( struct da_softc * ) periph -> softc ; cam_periph_lock ( periph ) ; if ( ( softc -> flags & DA_FLAG_PACK_INVALID ) ) { cam_periph_unlock ( periph ) ; biofinish ( bp , NULL , ENXIO ) ; return ; } CAM_DEBUG ( periph -> path , CAM_DEBUG_TRACE , ( " \n " , bp ) ) ; if ( bp -> bio_cmd == BIO_ZONE ) bp -> bio_flags |= BIO_ORDERED ; cam_iosched_queue_work ( softc -> cam_iosched , bp ) ; daschedule ( periph ) ; cam_periph_unlock ( periph ) ; return ; }
Actually translate the requested transfer into one the physical driver
 can understand.
Actually translate the requested transfer into one the physical driver can understand .
/*
	 * If the device has been made invalid, error out
	 */ /*
	 * Zone commands must be ordered, because they can depend on the
	 * effects of previously issued commands, and they may affect
	 * commands after them.
	 */ /*
	 * Place it in the queue of disk activities for this disk
	 */ /*
	 * Schedule ourselves for performing the work.
	 */