Re: [PATCH scsi-misc-2.6 08/13] scsi: move request preps in other places into prep_fn()

From: Tejun Heo
Date: Fri Apr 01 2005 - 00:31:21 EST


Hello, James.

On Thu, Mar 31, 2005 at 12:07:44PM -0600, James Bottomley wrote:
> On Thu, 2005-03-31 at 18:08 +0900, Tejun Heo wrote:
> > Move request preparations scattered in scsi_request_fn() and
> > scsi_dispatch_cmd() into scsi_prep_fn().
> >
> > * CDB_SIZE check in scsi_dispatch_cmd()
> > * SCSI-2 LUN preparation in scsi_dispatch_cmd()
> > * scsi_init_cmd_errh() in scsi_request_fn()
> >
> > No invalid request reaches scsi_request_fn() anymore.
>
> This one, I like, there's just one small problem:
>
> You can't move scsi_init_cmd_errh() out of the request function path:
> It's where we set up the sense buffer handling, so it has to be done
> every time the command is prepared for execution (the prep function is
> only called once)---think what happens if we turn a command around for
> retry based on a sense indication.
>
> So redo the patch and I'll put it in.

Ah.. with later requeue path consolidation patches, all requests get
their sense buffer cleared during requeueing, which, IMHO, is more
logical. Moving scsi_init_cmd_errh() should come after the patch.
Sorry. :-)

I'll make another take of this patchset (maybe subset) after issues
are resolved. I'll split and reorder relocation of scsi_init_cmd_errh
then.

Thanks.

--
tejun

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/