Re: [PATCH] libata: 'done' related SCSI cleanups
From: Tejun Heo
Date: Thu Nov 18 2010 - 04:27:41 EST
Hello, Jeff.
On 11/18/2010 05:04 AM, Jeff Garzik wrote:
>
> Checked this into #upstream...
>
> We cannot easily remove 'scsidone' pointer from struct ata_queued_cmd,
> because of the following code in __ata_eh_qc_complete():
>
> static void ata_eh_scsidone(struct scsi_cmnd *scmd)
> {
> /* nada */
> }
>
> ...
>
> spin_lock_irqsave(ap->lock, flags);
> qc->scsidone = ata_eh_scsidone;
> __ata_qc_complete(qc);
> spin_unlock_irqrestore(ap->lock, flags);
>
> scsi_eh_finish_cmd(scmd, &ap->eh_done_q);
>
> I guess we're avoiding scsi_eh_done() here, Tejun?
No, we're avoiding the usual scsi_done() as after EH they're done by
scsi_eh_flush_done_q(). We can factor out ata_scsi_qc_complete() and
atapi_qc_complete() and create EH variants which don't call ->scsidone
but I'm not sure that would worth the hassle.
Thank you.
--
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/