Re: [PATCH] use LUN association and SNS ID type for the VPD (0x83) page

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

 



On Wed, 25 Feb 2009 17:57:11 +0200
Or Gerlitz <ogerlitz@xxxxxxxxxxxx> wrote:

> FUJITA Tomonori wrote:
> > Your patch does the right thing for only iSCSI? We need to do the
> > right things for other protocols.
> 
> My patch wasn't related to the protocol id field. Your patch removes the 
> reporting of tgt on iscsi id type and I'm fine with this, but per my understanding
> it has nothing to do with the problem I had and the fix I suggested.

I'm talking about 'iqn.' stuff in your patch.


> > A simple patch like this doesn't work for you? I guess that we still
> > need to add a new user interface to change 0x83 VPD page freely though.
> 
> Yes, it works fine, thanks! To make sure we're on the same page, your patch
> does four changes to vpd page 0x83
>
> 1. doesn't report protocol id anymore (PIV set to zero)

Yes. I checked some SAS, FC, iSCSI drives and none sets PIV bit. So I
guess that it's fine to drop PIV bit and the protocol bit.

> 2. reports LUN association (zero) instead of target port association

Yes,

> 3. reports T10 identifier type instead of vendor specific

Yes,

> 4. uses the T10 IET assigned name in the identifier

Yes,


> I am fine with the patch and it allows me to achieve the interop
> with the vmware stack, to make it clearer I would add the LU association

I see, thanks for confirmation. I'll merge it.

> 
> --- tgt.orig/usr/spc.c
> +++ tgt/usr/spc.c
> @@ -133,8 +133,8 @@ static void update_vpd_83(struct scsi_lu
>  	struct vpd *vpd_pg = lu->attrs.lu_vpd[3];
>  	uint8_t	*data = vpd_pg->data;
>  
> -	data[0] = (PIV_ISCSI << 4) | INQ_CODE_ASCII;
> -	data[1] = PIV_VALID | ASS_TGT_PORT | DESG_VENDOR;
> +	data[0] = INQ_CODE_ASCII;
> +	data[1] = ASS_LU | DESG_T10;
>  	data[3] = SCSI_ID_LEN;
>  
>  	strncpy((char *)data + 4, id, SCSI_ID_LEN);
> @@ -1029,7 +1029,7 @@ int spc_lu_init(struct scsi_lu *lu)
>  	snprintf(lu->attrs.product_rev, sizeof(lu->attrs.product_rev),
>  		 "%s", "0001");
>  	snprintf(lu->attrs.scsi_id, sizeof(lu->attrs.scsi_id),
> -		 "deadbeaf%d:%" PRIu64, tgt->tid, lu->lun);
> +		 "IET     %04x%04" PRIx64, tgt->tid, lu->lun);
>  	snprintf(lu->attrs.scsi_sn, sizeof(lu->attrs.scsi_sn),
>  		 "beaf%d%" PRIu64, tgt->tid, lu->lun);
>  
> --
> To unsubscribe from this list: send the line "unsubscribe stgt" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe stgt" 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]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux