2014/09/24

Linux iSCSI Target Implementation

iSCSI command execution
-------------------
target_submit_cmd
target_submit_cmd_map_sgls
target_setup_cmd_from_cdb
  transport->parse_cdb(sbc_parse_cdb)
    sbc_execute_rw
      cmd->execute_rw // se_cmd.execute_rw points to sbc_ops->execute_rw

// destination to file      
fd_sbc_ops.execute_rw(fd_execute_rw)
  fd_do_rw
    vfs_readv
    vfs_writev
     
// destination to block device  
iblock_sbc_ops.execute_rw(iblock_execute_rw)
  // block device read write
  iblock_submit_bios
    block_lba = (cmd->t_task_lba << 3);
    submit_bio

     
iSCSI communication      
-------------------
iscsit_do_tx_data
  kernel_sendmsg
iscsit_do_rx_data
  kernel_recvmsg

iscsit_accept_np
  kernel_accept
iscsit_setup_np
  kernel_bind



iSCSI Authentication      
-------------------
__iscsi_target_login_thread
iscsi_target_start_negotiation
iscsi_target_do_login
iscsi_target_handle_csg_zero
iscsi_target_do_authentication
iscsi_handle_authentication

No comments:

Post a Comment

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...