On Fri, 2017-06-02 at 09:22 +0200, Christoph Hellwig wrote:
> I like this idea, but..
> 
> > -void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd)
> > +void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd,
> > +                  struct scsi_data_buffer *prot_sdb)
> >  {
> >     void *buf = cmd->sense_buffer;
> > -   void *prot = cmd->prot_sdb;
> >     unsigned int unchecked_isa_dma = cmd->flags & SCMD_UNCHECKED_ISA_DMA;
> >  
> >     /* zero out the cmd, except for the embedded scsi_request */
> > @@ -1164,7 +1164,7 @@ void scsi_init_command(struct scsi_device *dev, 
> > struct scsi_cmnd *cmd)
> >  
> >     cmd->device = dev;
> >     cmd->sense_buffer = buf;
> > -   cmd->prot_sdb = prot;
> > +   cmd->prot_sdb = prot_sdb;
> 
> What would be the problem of always preserving the original prot_sdb
> value instead of passing it by argument?  You;d just need to initialize
> it in scsi_init_request when the command is allocated.

Hello Christoph,

That sounds like a good idea to me. I will make that change.

Bart.

Reply via email to