On Fri, May 20, 2016 at 06:33:25PM -0500, hao wen wrote: > Hi Chris, > > Thank you for you reply. > Just to be specific, can I get the scsi commands and try to do some process > on it in function like iscsi_data_xmit*(struct* iscsi_conn ***conn*) *before > the scsi commands are finally transmitted to the iscsi target?
Look at the .queuecommand field in the scsi_host_template used by your driver, it will point to the top level function that takes commands from the SCSI midlayer to send to the target. For iscsi_tcp, that's iscsi_queuecommand. You can follow the calls down from there, but that's the interface where SCSI transports take commands. - Chris > 2016-05-20 18:18 GMT-05:00 Chris Leech <[email protected]>: > > > On Mon, May 09, 2016 at 08:32:54AM -0700, [email protected] wrote: > > > Hi, > > > > > > I am recently looking into the process of iSCSI initiator. I wonder where > > > the source codes are that receive the scsi commands and encapsulate them > > > into iscsi format. I have walked through the interaction between iscsiadm > > > and iscsid, but I did find that. I thought it may be written in qtask > > > structure, but it seems the payload_len is never set within the code. > > > > > > Could anyone help answer this question? > > > > The userspace tools only handle iSCSI session management tasks. The > > SCSI command handling is done in the Linux kernel drivers, which > > interact with the kernel SCSI subsystem. > > > > - Chris > > > > -- > You received this message because you are subscribed to the Google Groups > "open-iscsi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/open-iscsi. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
