Thanks Hannes, When we created new 4K based logical drive/container with the name length 16 but we were seeing only first 15 characters in Linux OS by "sg_map -i", cat /proc/scsi/scsi.
This change fixes logical drive name display issue. -----Original Message----- From: Hannes Reinecke [mailto:h...@suse.de] Sent: Friday, March 27, 2015 3:45 PM To: Mahesh Rajashekhara; jbottom...@parallels.com; linux-scsi@vger.kernel.org Cc: Achim Leubner Subject: Re: [V2 PATCH 03/11] aacraid: 4KB sector support On 03/26/2015 03:41 PM, Mahesh Rajashekhara wrote: > Add 4KB sector support > > Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekh...@pmcs.com> > --- > drivers/scsi/aacraid/aachba.c | 240 +++++++++++++++++++++++++++++++-------- > drivers/scsi/aacraid/aacraid.h | 11 ++- > 2 files changed, 200 insertions(+), 51 deletions(-) > > diff --git a/drivers/scsi/aacraid/aachba.c > b/drivers/scsi/aacraid/aachba.c index b32e77d..aee3eaa 100644 > --- a/drivers/scsi/aacraid/aachba.c > +++ b/drivers/scsi/aacraid/aachba.c > @@ -111,6 +111,41 @@ > #define BYTE2(x) (unsigned char)((x) >> 16) #define BYTE3(x) > (unsigned char)((x) >> 24) > > +/* MODE_SENSE data format */ > +typedef struct { > + struct { > + u8 data_length; > + u8 med_type; > + u8 dev_par; > + u8 bd_length; > + } __attribute__((packed)) hd; > + struct { > + u8 dens_code; > + u8 block_count[3]; > + u8 reserved; > + u8 block_length[3]; > + } __attribute__((packed)) bd; > + u8 mpc_buf[3]; > +} __attribute__((packed)) aac_modep_data; > + > +/* MODE_SENSE_10 data format */ > +typedef struct { > + struct { > + u8 data_length[2]; > + u8 med_type; > + u8 dev_par; > + u8 rsrvd[2]; > + u8 bd_length[2]; > + } __attribute__((packed)) hd; > + struct { > + u8 dens_code; > + u8 block_count[3]; > + u8 reserved; > + u8 block_length[3]; > + } __attribute__((packed)) bd; > + u8 mpc_buf[3]; > +} __attribute__((packed)) aac_modep10_data; > + > > /*------------------------------------------------------------------------------ > * S T R U C T S / T Y P E D E F S > > *--------------------------------------------------------------------- > -------*/ @@ -438,7 +473,7 @@ static void > get_container_name_callback(void *context, struct fib * fibptr) > if ((le32_to_cpu(get_name_reply->status) == CT_OK) > && (get_name_reply->data[0] != '\0')) { > char *sp = get_name_reply->data; > - sp[sizeof(((struct aac_get_name_resp *)NULL)->data)-1] = '\0'; > + sp[sizeof(((struct aac_get_name_resp *)NULL)->data)] = '\0'; > while (*sp == ' ') > ++sp; > if (*sp) { What has this to do with 4k block support? Looks rather like an unrelated bugfix to me... Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html