[Stgt-devel] About the command execution in tgt
Thu Feb 21 15:46:27 CET 2008
erezz at Voltaire.COM wrote on Thu, 21 Feb 2008 14:04 +0200:
> I'm going over some of the code, and now I'm trying to understand how is
> the cmd executed in the backing store. I know how it is done in kernel
> space (just call scsi-ml), but I'm pretty new to userspace.
> I saw that scsi_cmd_perform calls
> cmd->dev->dev_type_template.ops[op].cmd_perform. I didn't find any
> implementation for cmd_perform in the code. Can anyone give a brief
Look at struct device_type_template and device_type_operations. It
has an array of ops, one for each of the potential 256 1-byte
opcodes in the SCSI command. See the bottom of sbc.c for the list
of ops that block devices support, for example.
More information about the stgt