際際滷

際際滷Share a Scribd company logo
tgtd illustration
                          based on https://github.com/fujita/tgt




Tuesday, November 8, 11                                            1
General Arch
                     epoll         iSCSI, iSER,                            bst: aio, rdwr,
                                   FCoE, etc.                              null, sg, ssc



                             low level                                backing
           initiator
                              drivers    con                           stores
                                               n
                                                               R &W
                                              target
                                                                           mmc, osd,
                                                   Core                    sbc, scc, smc,
                                                                           ssc
                                                       lu     SC
                                           a  sk                SI
                                         mt
                                                                       spc &
           tgtadm             mgmt
                                                                      devices
                                                     utils,
                                                   common

Tuesday, November 8, 11                                                                      2
Mgmt Routine
                                              If req Len>
                                              tgtadm_req    tgt_mgmt
      tgtadm send
     commands here                  mtask_handler
                                    HDR_RECV                  sys_mgmt
                                    PDU_RECV
                                                              target_mgmt

                          IPC:                      mgmt_task portal_mgmt

                                                              device_mgmt
                                       mtask_handler
                                       RSP_SEND               account_mgmt

                                                              connection_mgmt




Tuesday, November 8, 11                                                         3
State Transition of Conn
                                                             Security           Security
                                      Security                auth               Done


                     Free                        Security
                                                  login

                                                                                Security
                                       Login                 Login full
                                                                                  full
     Only for iSER




                        Init
                       Start
                                                                Full            Kernel
                      Ready              Network Error


                        Proto Error                                    Logout
                                        Exit                Close                Scsi

Tuesday, November 8, 11                                                                    4
Cmd rx in iscsid 1
                                             Immediate:
     OpXX                 iscsi_task_queue   iscsi_task_ececute
                                             Other:
     OP_DATA_OUT                               expected SNs:
                                               iscsi_task_execute
                                               Others:
      iscsi_task_ececute
                                               Add to pending list
                   NOOP_OUT/LOGOUT:
                   Set EPOLLIN|EPOLLOUT         queue:

                   SCSI_CMD:                    target_cmd_queue
                                                                 ... target.c
                   iscsi_scsi_cmd_execute       all:

                   SCSI_TMFUNC:
                                                Set EPOLLIN|EPOLLOUT
                   iscsi_tm_execute          target_mgmt_request
                                                               ... target.c


Tuesday, November 8, 11                                                         5
Cmd rx in iscsid 2
     OpXX

     OP_DATA_OUT               iscsi_data_out_rx_done


                                   Do nothing

                                   FINAL && not pending:
                                   iscsi_scsi_cmd_execute
                                          ... as in prev page



Tuesday, November 8, 11                                         6
SCSI Cmd Processing            In target.c, scsi.c, & devs


                           cmd_perform ==

                           scsi_cmd_perfor

                          scsi_cmd_queued
                              Processed later

                          dev_type_template.ops[op]. cmd_perfor

                                sbc_rw, sbc_sync_cache               BS

                                Others processed in sbc.c or spc.c

Tuesday, November 8, 11                                                       7
Backing Storage
                                 bs_init      bs_thread_info follows lu

                    Create LU

                                 bs_open         pathname, fd, size




                   Dev request       bs_cmd_submit(cmd)

                    Destroy LU       bs_close, bs_exit

Tuesday, November 8, 11                                                   8
That's All.
                             Thanks!




Tuesday, November 8, 11                 9

More Related Content

Similar to Tgtd illustration (20)

[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis
Moabi.com
?
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
Emanuel Calvo
?
IRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleIRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the Preemptible
Alison Chaiken
?
[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware
[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware
[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware
Simen Li
?
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis
Moabi.com
?
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
Rajan Kumar
?
Interrupts
InterruptsInterrupts
Interrupts
Anil Kumar Pugalia
?
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
Adrien Mahieux
?
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis
Moabi.com
?
Linux-without-a-bootloader
Linux-without-a-bootloaderLinux-without-a-bootloader
Linux-without-a-bootloader
Nishanth Menon
?
Code Red Security
Code Red SecurityCode Red Security
Code Red Security
Amr Ali
?
Kernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architectureKernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architecture
Anne Nicolas
?
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation
Moabi.com
?
Gluster as Block Store in Containers
Gluster as Block Store in ContainersGluster as Block Store in Containers
Gluster as Block Store in Containers
Gluster.org
?
Tierney bq207
Tierney bq207Tierney bq207
Tierney bq207
Obsidian Software
?
OpenDNSSEC RIPE58
OpenDNSSEC RIPE58OpenDNSSEC RIPE58
OpenDNSSEC RIPE58
pawal
?
A little systemtap
A little systemtapA little systemtap
A little systemtap
yang bingwu
?
A little systemtap
A little systemtapA little systemtap
A little systemtap
yang bingwu
?
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
Andrey Karpov
?
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
PVS-Studio
?
[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis[Ruxcon 2011] Post Memory Corruption Memory Analysis
[Ruxcon 2011] Post Memory Corruption Memory Analysis
Moabi.com
?
IRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleIRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the Preemptible
Alison Chaiken
?
[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware
[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware
[ZigBee 廼秘塀狼y] ZigBee 喘恬 - 聞喘 TI Z-Stack Firmware
Simen Li
?
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis
Moabi.com
?
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
Rajan Kumar
?
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis
Moabi.com
?
Linux-without-a-bootloader
Linux-without-a-bootloaderLinux-without-a-bootloader
Linux-without-a-bootloader
Nishanth Menon
?
Code Red Security
Code Red SecurityCode Red Security
Code Red Security
Amr Ali
?
Kernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architectureKernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architecture
Anne Nicolas
?
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation
Moabi.com
?
Gluster as Block Store in Containers
Gluster as Block Store in ContainersGluster as Block Store in Containers
Gluster as Block Store in Containers
Gluster.org
?
OpenDNSSEC RIPE58
OpenDNSSEC RIPE58OpenDNSSEC RIPE58
OpenDNSSEC RIPE58
pawal
?
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
Andrey Karpov
?
Static analysis of C++ source code
Static analysis of C++ source codeStatic analysis of C++ source code
Static analysis of C++ source code
PVS-Studio
?

More from Xu Wang (9)

Hyper: 斑Pod參VM葎円順
Hyper: 斑Pod參VM葎円順Hyper: 斑Pod參VM葎円順
Hyper: 斑Pod參VM葎円順
Xu Wang
?
Hyper 児噐hypervisor議docker哈陪.pptx
Hyper 児噐hypervisor議docker哈陪.pptxHyper 児噐hypervisor議docker哈陪.pptx
Hyper 児噐hypervisor議docker哈陪.pptx
Xu Wang
?
Rethink of PaaS
Rethink of PaaSRethink of PaaS
Rethink of PaaS
Xu Wang
?
Cassandra Technical and history overview
Cassandra Technical and history overviewCassandra Technical and history overview
Cassandra Technical and history overview
Xu Wang
?
舘艶姻看珂河初府
舘艶姻看珂河初府舘艶姻看珂河初府
舘艶姻看珂河初府
Xu Wang
?
採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶
採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶
採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶
Xu Wang
?
Metro Beijing
Metro BeijingMetro Beijing
Metro Beijing
Xu Wang
?
Cloud Computing Seminar with BUPT WTI
Cloud Computing Seminar with BUPT WTICloud Computing Seminar with BUPT WTI
Cloud Computing Seminar with BUPT WTI
Xu Wang
?
Hadoop development in China Mobile Research Institute
Hadoop development in China Mobile Research InstituteHadoop development in China Mobile Research Institute
Hadoop development in China Mobile Research Institute
Xu Wang
?
Hyper: 斑Pod參VM葎円順
Hyper: 斑Pod參VM葎円順Hyper: 斑Pod參VM葎円順
Hyper: 斑Pod參VM葎円順
Xu Wang
?
Hyper 児噐hypervisor議docker哈陪.pptx
Hyper 児噐hypervisor議docker哈陪.pptxHyper 児噐hypervisor議docker哈陪.pptx
Hyper 児噐hypervisor議docker哈陪.pptx
Xu Wang
?
Rethink of PaaS
Rethink of PaaSRethink of PaaS
Rethink of PaaS
Xu Wang
?
Cassandra Technical and history overview
Cassandra Technical and history overviewCassandra Technical and history overview
Cassandra Technical and history overview
Xu Wang
?
舘艶姻看珂河初府
舘艶姻看珂河初府舘艶姻看珂河初府
舘艶姻看珂河初府
Xu Wang
?
採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶
採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶
採扮検堝柊勝壓臼喨臼喨射剩析弗卞強札選利仁殻貧議讐吶
Xu Wang
?
Metro Beijing
Metro BeijingMetro Beijing
Metro Beijing
Xu Wang
?
Cloud Computing Seminar with BUPT WTI
Cloud Computing Seminar with BUPT WTICloud Computing Seminar with BUPT WTI
Cloud Computing Seminar with BUPT WTI
Xu Wang
?
Hadoop development in China Mobile Research Institute
Hadoop development in China Mobile Research InstituteHadoop development in China Mobile Research Institute
Hadoop development in China Mobile Research Institute
Xu Wang
?

Recently uploaded (20)

AI and developer obsolescence - BCS 2025.pdf
AI and developer obsolescence - BCS 2025.pdfAI and developer obsolescence - BCS 2025.pdf
AI and developer obsolescence - BCS 2025.pdf
Seb Rose
?
AI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide SprintAI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide Sprint
Nathan Bijnens
?
SOC as a Service C 24/7 Threat Monitoring and Response
SOC as a Service C 24/7 Threat Monitoring and ResponseSOC as a Service C 24/7 Threat Monitoring and Response
SOC as a Service C 24/7 Threat Monitoring and Response
Cybercops
?
Cleveland Salesforce Developer Group March 2025
Cleveland Salesforce Developer Group March 2025Cleveland Salesforce Developer Group March 2025
Cleveland Salesforce Developer Group March 2025
Lynda Kane
?
AI¨s Transformative Role in Cloud Computing
AI¨s Transformative Role in Cloud ComputingAI¨s Transformative Role in Cloud Computing
AI¨s Transformative Role in Cloud Computing
Expeed Software
?
Large Language Models vs Small Language Models
Large Language Models vs Small Language ModelsLarge Language Models vs Small Language Models
Large Language Models vs Small Language Models
Nathan Bijnens
?
CXL Market Perspective: Get Ready for Adoption and Growth in 2025
CXL Market Perspective: Get Ready for Adoption and Growth in 2025CXL Market Perspective: Get Ready for Adoption and Growth in 2025
CXL Market Perspective: Get Ready for Adoption and Growth in 2025
AI Infra Forum
?
Fran?ais Patch Tuesday - Mars
Fran?ais Patch Tuesday - MarsFran?ais Patch Tuesday - Mars
Fran?ais Patch Tuesday - Mars
Ivanti
?
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve EfficiencyAEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
Nikhil Gupta
?
Memory over Fabrics: An Open Journey from CXL to UALink in AI Infrastructure
Memory over Fabrics: An Open Journey from CXL to UALink in AI InfrastructureMemory over Fabrics: An Open Journey from CXL to UALink in AI Infrastructure
Memory over Fabrics: An Open Journey from CXL to UALink in AI Infrastructure
AI Infra Forum
?
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
Fwdays
?
Measuring AI: Why benchmarks matter, and how to build the right ones
Measuring AI: Why benchmarks matter, and how to build the right onesMeasuring AI: Why benchmarks matter, and how to build the right ones
Measuring AI: Why benchmarks matter, and how to build the right ones
AI Infra Forum
?
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
Fwdays
?
Global AI Bootcamp 2025 - Sydney - Model Agnostic AI Implementation
Global  AI Bootcamp 2025 - Sydney - Model Agnostic AI ImplementationGlobal  AI Bootcamp 2025 - Sydney - Model Agnostic AI Implementation
Global AI Bootcamp 2025 - Sydney - Model Agnostic AI Implementation
Anupam Ranku
?
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Safe Software
?
[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...
[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...
[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...
Jason Yip
?
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
Unified Observability - Alkin Tezuysal - FOSSASIA Summit  March 2025 .pdfUnified Observability - Alkin Tezuysal - FOSSASIA Summit  March 2025 .pdf
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
Alkin Tezuysal
?
The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024
Arif Efendi
?
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdfBest Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Hercules Hoists
?
UiPath Automation Developer Associate Training Series 2025 - Session 5
UiPath Automation Developer Associate Training Series 2025 - Session 5UiPath Automation Developer Associate Training Series 2025 - Session 5
UiPath Automation Developer Associate Training Series 2025 - Session 5
DianaGray10
?
AI and developer obsolescence - BCS 2025.pdf
AI and developer obsolescence - BCS 2025.pdfAI and developer obsolescence - BCS 2025.pdf
AI and developer obsolescence - BCS 2025.pdf
Seb Rose
?
AI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide SprintAI Agents, such as Autogen at Tide Sprint
AI Agents, such as Autogen at Tide Sprint
Nathan Bijnens
?
SOC as a Service C 24/7 Threat Monitoring and Response
SOC as a Service C 24/7 Threat Monitoring and ResponseSOC as a Service C 24/7 Threat Monitoring and Response
SOC as a Service C 24/7 Threat Monitoring and Response
Cybercops
?
Cleveland Salesforce Developer Group March 2025
Cleveland Salesforce Developer Group March 2025Cleveland Salesforce Developer Group March 2025
Cleveland Salesforce Developer Group March 2025
Lynda Kane
?
AI¨s Transformative Role in Cloud Computing
AI¨s Transformative Role in Cloud ComputingAI¨s Transformative Role in Cloud Computing
AI¨s Transformative Role in Cloud Computing
Expeed Software
?
Large Language Models vs Small Language Models
Large Language Models vs Small Language ModelsLarge Language Models vs Small Language Models
Large Language Models vs Small Language Models
Nathan Bijnens
?
CXL Market Perspective: Get Ready for Adoption and Growth in 2025
CXL Market Perspective: Get Ready for Adoption and Growth in 2025CXL Market Perspective: Get Ready for Adoption and Growth in 2025
CXL Market Perspective: Get Ready for Adoption and Growth in 2025
AI Infra Forum
?
Fran?ais Patch Tuesday - Mars
Fran?ais Patch Tuesday - MarsFran?ais Patch Tuesday - Mars
Fran?ais Patch Tuesday - Mars
Ivanti
?
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve EfficiencyAEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
AEM Branding Rollout: How to Minimize Downtime & Improve Efficiency
Nikhil Gupta
?
Memory over Fabrics: An Open Journey from CXL to UALink in AI Infrastructure
Memory over Fabrics: An Open Journey from CXL to UALink in AI InfrastructureMemory over Fabrics: An Open Journey from CXL to UALink in AI Infrastructure
Memory over Fabrics: An Open Journey from CXL to UALink in AI Infrastructure
AI Infra Forum
?
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
[QUICK TALK] "Coaching 101: How to Identify and Develop Your Leadership Quali...
Fwdays
?
Measuring AI: Why benchmarks matter, and how to build the right ones
Measuring AI: Why benchmarks matter, and how to build the right onesMeasuring AI: Why benchmarks matter, and how to build the right ones
Measuring AI: Why benchmarks matter, and how to build the right ones
AI Infra Forum
?
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
[QUICK TALK] "Why Some Teams Grow Better Under Pressure", Oleksandr Marchenko...
Fwdays
?
Global AI Bootcamp 2025 - Sydney - Model Agnostic AI Implementation
Global  AI Bootcamp 2025 - Sydney - Model Agnostic AI ImplementationGlobal  AI Bootcamp 2025 - Sydney - Model Agnostic AI Implementation
Global AI Bootcamp 2025 - Sydney - Model Agnostic AI Implementation
Anupam Ranku
?
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Powering Energy and Utilities with Data Integration: Smarter Data, Smoother O...
Safe Software
?
[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...
[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...
[NYC Scrum] 4 bad ideas about productivity... and what Agilists should do ins...
Jason Yip
?
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
Unified Observability - Alkin Tezuysal - FOSSASIA Summit  March 2025 .pdfUnified Observability - Alkin Tezuysal - FOSSASIA Summit  March 2025 .pdf
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
Alkin Tezuysal
?
The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024
Arif Efendi
?
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdfBest Crane Manufacturers in India Industry Leaders & Innovations.pdf
Best Crane Manufacturers in India Industry Leaders & Innovations.pdf
Hercules Hoists
?
UiPath Automation Developer Associate Training Series 2025 - Session 5
UiPath Automation Developer Associate Training Series 2025 - Session 5UiPath Automation Developer Associate Training Series 2025 - Session 5
UiPath Automation Developer Associate Training Series 2025 - Session 5
DianaGray10
?

Tgtd illustration

  • 1. tgtd illustration based on https://github.com/fujita/tgt Tuesday, November 8, 11 1
  • 2. General Arch epoll iSCSI, iSER, bst: aio, rdwr, FCoE, etc. null, sg, ssc low level backing initiator drivers con stores n R &W target mmc, osd, Core sbc, scc, smc, ssc lu SC a sk SI mt spc & tgtadm mgmt devices utils, common Tuesday, November 8, 11 2
  • 3. Mgmt Routine If req Len> tgtadm_req tgt_mgmt tgtadm send commands here mtask_handler HDR_RECV sys_mgmt PDU_RECV target_mgmt IPC: mgmt_task portal_mgmt device_mgmt mtask_handler RSP_SEND account_mgmt connection_mgmt Tuesday, November 8, 11 3
  • 4. State Transition of Conn Security Security Security auth Done Free Security login Security Login Login full full Only for iSER Init Start Full Kernel Ready Network Error Proto Error Logout Exit Close Scsi Tuesday, November 8, 11 4
  • 5. Cmd rx in iscsid 1 Immediate: OpXX iscsi_task_queue iscsi_task_ececute Other: OP_DATA_OUT expected SNs: iscsi_task_execute Others: iscsi_task_ececute Add to pending list NOOP_OUT/LOGOUT: Set EPOLLIN|EPOLLOUT queue: SCSI_CMD: target_cmd_queue ... target.c iscsi_scsi_cmd_execute all: SCSI_TMFUNC: Set EPOLLIN|EPOLLOUT iscsi_tm_execute target_mgmt_request ... target.c Tuesday, November 8, 11 5
  • 6. Cmd rx in iscsid 2 OpXX OP_DATA_OUT iscsi_data_out_rx_done Do nothing FINAL && not pending: iscsi_scsi_cmd_execute ... as in prev page Tuesday, November 8, 11 6
  • 7. SCSI Cmd Processing In target.c, scsi.c, & devs cmd_perform == scsi_cmd_perfor scsi_cmd_queued Processed later dev_type_template.ops[op]. cmd_perfor sbc_rw, sbc_sync_cache BS Others processed in sbc.c or spc.c Tuesday, November 8, 11 7
  • 8. Backing Storage bs_init bs_thread_info follows lu Create LU bs_open pathname, fd, size Dev request bs_cmd_submit(cmd) Destroy LU bs_close, bs_exit Tuesday, November 8, 11 8
  • 9. That's All. Thanks! Tuesday, November 8, 11 9