On Tue, 2013-12-17 at 11:50 -0800, Nicholas A. Bellinger wrote: > On Tue, 2013-12-17 at 09:18 +0100, Hannes Reinecke wrote: > > We should be including a descriptor referring to the target device > > to allow identification of different TCM instances. > > > > Signed-off-by: Hannes Reinecke <hare@xxxxxxx> > > --- > > drivers/target/target_core_spc.c | 43 +++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 42 insertions(+), 1 deletion(-) > > > > One issue with this patch. The local buffer in spc_emulate_inquiry is > currently hardcoded to SE_INQUIRY_BUF=512, so two large scsi name > designators could overflow here.. > > So for the largest case with EVPD=0x83, this would be: > > 4 bytes for header + > 20 bytes for NAA IEEE Registered Extended Assigned designator + > 56 bytes for T10 Vendor Identifier + > 8 bytes for Relative target port + > 8 bytes for Target port group + > 8 bytes for Logical unit group + > 256 bytes for SCSI name (target port) + > 256 bytes for SCSI name (target device) == 616 bytes. > > So for good measure, bumping up SE_INQUIRY_BUF to 1024. > Mmmm, looking at this again, is reporting back two SCSI names in EVPD=0x83 with different associations (one for target port, and one for target device) really necessary..? Doesn't the existing target port association report back the same information..? --nab -- 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