On 10/07/2015 05:38 AM, David Disseldorp wrote: > Hi Christophe, > > On Tue, 6 Oct 2015 11:39:43 +0200, Christophe Vu-Brugier wrote: > >> Hi David, >> >> On Fri, 2 Oct 2015 16:22:29 +0200, David Disseldorp wrote : >>> This patch-set allows for the modification of the T10 Vendor >>> Identification string returned in the SCSI INQUIRY response, via the >>> target/core/$backstore/$name/wwn/vendor_id ConfigFS path. >> >> Your patch is a welcome addition: I believe a lot of storage vendors >> that rely on LIO carry a patch to change the vendor ID. >> >> I tested your patch set and I think it does not work as expected when >> the vendor ID length is 8 characters: >> >> # echo -n "1234567" > /sys/kernel/config/target/core/iblock_0/block1/wwn/vendor_id >> # cat /sys/kernel/config/target/core/iblock_0/block1/wwn/vendor_id >> T10 Vendor Identification: 1234567 >> # echo -n "12345678" > /sys/kernel/config/target/core/iblock_0/block1/wwn/vendor_id >> sh: write error: Value too large for defined data type >> >> According to http://www.t10.org/ftp/t10/vendorid.txt, "The Vendor ID >> code shall be 8 or fewer ASCII graphic characters" and I see some >> vendor names in the list that are 8 characters long. > > The 7-char limitation was intentional, as there are some users which > rely on the t10_wwn vendor[8] array being null terminated. > I can add 8-char support to a V3 patch set if necessary, otherwise I'll > send a follow up later on. Much of the INQUIRY data can be non-null-terminated in practice and per standard (they didn't grok NULLs when they wrote the standard), so I'd rather see this be 8 bytes. > > Thanks for the feedback! > > Cheers, David > -- Lee Duncan -- 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