On Mon, 2014-03-31 at 08:08 +0200, Christoph Hellwig wrote:
> On Sun, Mar 30, 2014 at 10:45:04PM -0700, Nicholas A. Bellinger wrote:
> > > int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req)
> > > {
> > > - struct scsi_cmnd *cmd;
> > > - int ret = scsi_prep_state_check(sdev, req);
> > > -
> > > - if (ret != BLKPREP_OK)
> > > - return ret;
> > > -
> > > - cmd = scsi_get_cmd_from_req(sdev, req);
> > > - if (unlikely(!cmd))
> > > - return BLKPREP_DEFER;
> > > + struct scsi_cmnd *cmd = req->special;
> > >
> >
> > Mmm, I thought that req->special was only holding a pointer to a
> > pre-allocated scsi_cmnd during mq operation, no..?
>
> For the mq case the block layer sets up req->special. For the old case
> scsi_get_cmd_from_req sets up req->special the first it is called, and
> leaves it in there until the command is done.
Er, yes of course.
Reviewed-by: Nicholas Bellinger <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html