Hey Christoph, Sorry for the delay on reviewing these 3.6 bound items.. On Sun, 2012-05-20 at 11:59 -0400, Christoph Hellwig wrote: > this series attempts to modularize the CDB parsing, cleaning it up > and allow for non-SBC virtual backends. It also helps to push a lot > of passthrough specific code into the pscsi backend. > > While I can verify the virtual SBC mode works just fine with it, I have > so far failed to actually get pscsi running using lio-tool. > Ok, I've been able to test this series with tcm_loop <-> pscsi w/ scsi_debug using fio writeverify, and so far things are working as expected with struct request based control/data passthrough into scsi_debug LUNs. This series along with two additional pSCSI specific changes (that will be going out shortly) have been added into lio-core/3.6-queue for testing. > I tried variants of this command line: > > tcm_node --scsi pscsi_0/foo scsi0 0:0:0:0 > > and always get errors. For the specific one above it looks like: > sh: line 0: echo: write error: Invalid argument > pSCSI: createvirtdev failed for enable_opt with scsi_channel_id=scsi0 > Traceback (most recent call last): > File "/usr/sbin/tcm_node", line 739, in <module> > main() > File "/usr/sbin/tcm_node", line 731, in main > (options, args) = parser.parse_args() > File "/usr/lib/python2.6/optparse.py", line 1394, in parse_args > stop = self._process_args(largs, rargs, values) > File "/usr/lib/python2.6/optparse.py", line 1434, in _process_args > self._process_long_opt(rargs, values) > File "/usr/lib/python2.6/optparse.py", line 1509, in _process_long_opt > option.process(opt, value, values, self) > File "/usr/lib/python2.6/optparse.py", line 788, in process > self.action, self.dest, opt, value, values, parser) > File "/usr/lib/python2.6/optparse.py", line 808, in take_action > self.callback(self, opt, value, parser, *args, **kwargs) > File "/usr/sbin/tcm_node", line 711, in dispatcher > orig_callback(*value) > File "/usr/sbin/tcm_node", line 291, in tcm_create_pscsi > tcm_createvirtdev(dev_path, pscsi_params_str) > File "/usr/sbin/tcm_node", line 224, in tcm_createvirtdev > print tcm_read(full_path + "/info") > File "/usr/sbin/tcm_node", line 27, in tcm_read > return f.read() > IOError: [Errno 19] No such device The original tcm_node --scsi call had it's pSCSI HBA ID tied to the SCSI Host ID in H:C:T:L addressing mode. In modern target_core_pscsi.c code, the pSCSI HBA ID is arbitrary and HCTL is passed as separate key=value pairs into pSCSI device control attribute at createvirtdev time, so you'll want to use --scsibyudev: target# tcm_node --scsibyudev pscsi_0/scsi_debug_pscsi /dev/sdf ConfigFS Device Alias: pscsi_0/scsi_debug_pscsi ConfigFS HBA: pscsi_0 Successfully added TCM/ConfigFS HBA: pscsi_0 ConfigFS Device Alias: scsi_debug_pscsi Device Params ['/dev/sdf'] pSCSI: Referencing HCTL sys for udev_path: /dev/sdf Status: DEACTIVATED Execute/Max Queue Depth: 0/0 SectorSize: 512 HwMaxSectors: 65528 SCSI Device Bus Location: Channel ID: 0 Target ID: 0 LUN: 0 Host ID: 16 Vendor: Linux Model: scsi_debug Rev: 0004 Successfully created TCM/ConfigFS storage object: /sys/kernel/config/target/core/pscsi_0/scsi_debug_pscsi -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html