On Tuesday, December 10, 2019 at 4:20:28 AM UTC-8, Bobby wrote: > > > Like above, can you please give me more hints/clues in which other code(s) > I need to see. Which part of this gigantic MQ-Block layer code base to see > to understand the complete data flow? I am particularly interested in Hash > , Map data structures. >
No, not really. There are many great resources for learning about the kernel and its drivers, and the block layer. For example, join lwn.net and checkout https://lwn.net/Articles/736534/ And there are many great books, such as Linux Kernel Development. > > > On Tuesday, December 10, 2019 at 11:34:49 AM UTC+1, Bobby wrote: >> >> >> Perfect ! After this reply, I had to dig deeper and now it makes >> sense....thanks a lot The Lee-Man for explaining it so effectively... >> >> >> On Saturday, November 9, 2019 at 7:52:52 PM UTC+1, The Lee-Man wrote: >>> >>> On Friday, November 8, 2019 at 10:40:08 AM UTC-8, Bobby wrote: >>>> >>>> >>>> Hi Ulrich, >>>> >>>> Thanks for the hint. Can you please help me regarding following two >>>> questions. >>>> >>>> - Linux block layer perform IO scheduling IO submissions to storage >>>> device driver. If there is a physical device, the block layer interacts >>>> with it through SCSI mid layer and SCSI low level drivers. So, how >>>> *actually* a software initiator (*Open-iSCSI*) interacts with "*block >>>> layer*"? >>>> >>>> - What confuses me, where does the "*disk driver*" comes into play? >>>> >>>> Thanks :-) >>>> >>>> >>> In an iSCSI connection (session), there is the initiator and the target. >>> I assume you are talking about the initiator. >>> >>> On the initiator, the "magic" is done by the kernel, in particular the >>> iSCSI initiator code in the kernel, specifically by the >>> scsi_transport_iscsi.c in drivers/scsi. When an iSCSI connection is made, >>> the code creates a new "host" object, and then tests the device at the >>> other end of the connection. If it's a disc drive, then an instance of sd >>> is created (the disc driver). If the device is tape, a tape driver is >>> instantiated (st). Unrecognized devices still get a generic SCSI device >>> node, I believe. >>> >>> So, in this way, iSCSI is acting like an adapter driver, which plugs >>> into the SCSI mid-layer. >>> >>> You can run "sudo journalctl -xe --follow" in one window, then log into >>> an existing target in another (I used "sudo iscsiadm -m node -l"), and you >>> should see this kind of output from journalctl: >>> >>> ... >>> >>> >>> >>>> Nov 09 10:46:59 linux-dell kernel: iscsi: registered transport (tcp) >>>> Nov 09 10:46:59 linux-dell kernel: scsi host3: iSCSI Initiator over >>>> TCP/IP >>>> Nov 09 10:46:59 linux-dell iscsid[13175]: iscsid: Connection1:0 to >>>> [target: iqn.2003-01.org.linux-iscsi.linux-dell.x8664:sn.2a6e21b1b53c, >>>> portal: 192.168.20.3,3260] through [iface: default] is operational now >>>> Nov 09 10:46:59 linux-dell kernel: scsi 3:0:0:0: Direct-Access >>>> LIO-ORG test-disc 4.0 PQ: 0 ANSI: 5 >>>> Nov 09 10:46:59 linux-dell kernel: scsi 3:0:0:0: alua: supports >>>> implicit and explicit TPGS >>>> Nov 09 10:46:59 linux-dell kernel: scsi 3:0:0:0: alua: device >>>> naa.6001405de01c6e7933b414e901e22b0f port group 0 rel port 1 >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: Attached scsi generic >>>> sg1 type 0 >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: [sdb] 2097152 512-byte >>>> logical blocks: (1.07 GB/1.00 GiB) >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: [sdb] Write Protect is >>>> off >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: [sdb] Mode Sense: 43 00 >>>> 10 08 >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: [sdb] Write cache: >>>> enabled, read cache: enabled, supports DPO and FUA >>>> Nov 09 10:46:59 linux-dell kernel: >>>> iSCSI/iqn.1996-04.de.suse:01:54cab487975b: Unsupported SCSI Opcode 0xa3, >>>> sending CHECK_CONDITION. >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: [sdb] Optimal transfer >>>> size 8388608 bytes >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: [sdb] Attached SCSI disk >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: alua: transition timeout >>>> set to 60 seconds >>>> Nov 09 10:46:59 linux-dell kernel: sd 3:0:0:0: alua: port group 00 >>>> state A non-preferred supports TOlUSNA >>>> >>> ... >>> >>> -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/open-iscsi/e3a64e35-ac06-4e2d-a397-1e6f53ab25e7%40googlegroups.com.
