Re: NAA breakage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-08-15 at 18:55 +0200, Martin Svec wrote: 
> Hello,
> 
> Patch e270af8b3c3d6ff3dddc29667df69b691cc517c0 
> ("target: remove custom hex2bin() implementation") causes that for the 
> same serial number, NAA reported in VPD 0x83 is different than NAA 
> before this patch. Which in turn confuses iSCSI storage clients like 
> VMware ESXi etc. after upgrade to the lastest LIO target code.
> 
> Before patch:
> 
> Device Identification VPD page:
>    Addressed logical unit:
>      designator type: NAA,  code set: Binary
>        0x600140535a4c2c4daa90dd591dc453dd
>      designator type: T10 vendor identification,  code set: ASCII
>        vendor id: LIO-ORG
>        vendor specific: IBLOCK:35a4c2c4-aa90-d591-c453-d8a60ff00000
> 
> After patch:
> 
> Device Identification VPD page:
>    Addressed logical unit:
>      designator type: NAA,  code set: Binary
>        0x600140535a4c2c3faa90fd590fc453fd
>      designator type: T10 vendor identification,  code set: ASCII
>        vendor id: LIO-ORG
>        vendor specific: IBLOCK:35a4c2c4-aa90-d591-c453-d8a60ff00000
> 
> I'm not sure which NAA should be the "right" one but the patch 
> definitely breaks NAA compatibility with previous LIO 4.1 code. 
> Reverting the patch fixes the problem for me.
Thanks for pointing to this. Brief look at the code shows the difference
in handling of the improper hex characters:
in case of old code: (X - '0' & 0x0f)
in case of new code: -1 => 0xff

Thus, '-' character is interpreted in the other way. I have no idea how
thing should be converted properly, but it seems for me the '-' signs
should be skipped at all. So, by my opinion, the old code produces wrong
serial.

> Affected kernels: mainline 3.1-rc1, lio-core-2.6 master branch, 
> lio-4.1-3.0 branch.
> Unaffected kernels: lio-4.1-2.6.39 branch and olders


-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux