On Tue, 2011-07-19 at 07:56 +0200, Christoph Hellwig wrote: > On Mon, Jul 18, 2011 at 11:00:10PM -0700, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> > > > > This patch breaks up the ->map_task_SG() backend call into two seperate > > ->map_control_SG() and ->map_data_SG() in order to better address > > IBLOCK and pSCSI. IBLOCK only allocates bios for ->map_data_SG(), and > > pSCSI will allocate a struct request for both cases. > > In my opnion we should just copy the ->do_task logical, .e.g > > if ((TRANSPORT(dev)->transport_type != TRANSPORT_PLUGIN_PHBA_PDEV) && > (!(TASK_CMD(task)->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB))) > error = transport_emulate_control_cdb(task); > else > error = TRANSPORT(dev)->do_task(task); > > that is: don't even bother to call the backed unless we have to. > I thought about this, but think it's slightly cleaner to have ->map_control_SG() and ->map_data_SG() backend callers now that we have transport_allocate_control_task() and transport_allocate_data_tasks(). I'd like to avoid the TRANSPORT_PLUGIN_PHBA_PDEV usage, as that already looks kinda ugly.. ;) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html