Re: [PATCH 1/8] Drivers: scsi: storvsc: Change the limits to reflect the values on the host

2014-07-09 Thread Christoph Hellwig
On Tue, Jul 08, 2014 at 05:46:45PM -0700, K. Y. Srinivasan wrote:
 + * In Hyper-V, each port/path/target maps to 1 scsi host adapter.

Does it still?  The STORVSC_FC_MAX_TARGETS define suggests otherwise.

 - .cmd_per_lun =  1,
 + .cmd_per_lun =  255,

This looks like an unrelated change.

 + /* max # of devices per target */
 + host-max_lun = STORVSC_FC_MAX_LUNS_PER_TARGET;
 + /* max # of targets per channel */
 + host-max_id = STORVSC_FC_MAX_TARGETS;
 + /* max # of channels */
 + host-max_channel = STORVSC_FC_MAX_CHANNELS - 1;

I don't think these comments add any value..

Also any reason you use off by one defines for max_channel, but not the
others?

--
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


RE: [PATCH 1/8] Drivers: scsi: storvsc: Change the limits to reflect the values on the host

2014-07-09 Thread KY Srinivasan


 -Original Message-
 From: Christoph Hellwig [mailto:h...@infradead.org]
 Sent: Wednesday, July 9, 2014 1:40 AM
 To: KY Srinivasan
 Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
 oher...@suse.com; jbottom...@parallels.com; jasow...@redhat.com;
 a...@canonical.com; linux-scsi@vger.kernel.org; sta...@vger.kernel.org
 Subject: Re: [PATCH 1/8] Drivers: scsi: storvsc: Change the limits to reflect 
 the
 values on the host
 
 On Tue, Jul 08, 2014 at 05:46:45PM -0700, K. Y. Srinivasan wrote:
  + * In Hyper-V, each port/path/target maps to 1 scsi host adapter.
 
 Does it still?  The STORVSC_FC_MAX_TARGETS define suggests otherwise.

I will fix the comments and get rid of unnecessary comments.

 
  -   .cmd_per_lun =  1,
  +   .cmd_per_lun =  255,
 
 This looks like an unrelated change.

I will have a separate patch for this.
 
  +   /* max # of devices per target */
  +   host-max_lun = STORVSC_FC_MAX_LUNS_PER_TARGET;
  +   /* max # of targets per channel */
  +   host-max_id = STORVSC_FC_MAX_TARGETS;
  +   /* max # of channels */
  +   host-max_channel = STORVSC_FC_MAX_CHANNELS - 1;
 
 I don't think these comments add any value..

I will get rid of the comments.

 
 Also any reason you use off by one defines for max_channel, but not the
 others?

No particular reason; I will clean this up.


Thanks Christoph for the detailed comments. I will re-spin these after I 
address your comments.

Regards,

K. Y
--
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


RE: [PATCH 1/8] Drivers: scsi: storvsc: Change the limits to reflect the values on the host

2014-07-09 Thread KY Srinivasan


 -Original Message-
 From: driverdev-devel-boun...@linuxdriverproject.org [mailto:driverdev-
 devel-boun...@linuxdriverproject.org] On Behalf Of KY Srinivasan
 Sent: Wednesday, July 9, 2014 1:07 PM
 To: Christoph Hellwig
 Cc: linux-scsi@vger.kernel.org; jasow...@redhat.com; linux-
 ker...@vger.kernel.org; jbottom...@parallels.com; oher...@suse.com;
 sta...@vger.kernel.org; a...@canonical.com; de...@linuxdriverproject.org
 Subject: RE: [PATCH 1/8] Drivers: scsi: storvsc: Change the limits to reflect 
 the
 values on the host
 
 
 
  -Original Message-
  From: Christoph Hellwig [mailto:h...@infradead.org]
  Sent: Wednesday, July 9, 2014 1:40 AM
  To: KY Srinivasan
  Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
  oher...@suse.com; jbottom...@parallels.com; jasow...@redhat.com;
  a...@canonical.com; linux-scsi@vger.kernel.org; sta...@vger.kernel.org
  Subject: Re: [PATCH 1/8] Drivers: scsi: storvsc: Change the limits to
  reflect the values on the host
 
  On Tue, Jul 08, 2014 at 05:46:45PM -0700, K. Y. Srinivasan wrote:
   + * In Hyper-V, each port/path/target maps to 1 scsi host adapter.
 
  Does it still?  The STORVSC_FC_MAX_TARGETS define suggests otherwise.
 
 I will fix the comments and get rid of unnecessary comments.
 
 
   - .cmd_per_lun =  1,
   + .cmd_per_lun =  255,
 
  This looks like an unrelated change.
 
 I will have a separate patch for this.
 
   + /* max # of devices per target */
   + host-max_lun = STORVSC_FC_MAX_LUNS_PER_TARGET;
   + /* max # of targets per channel */
   + host-max_id = STORVSC_FC_MAX_TARGETS;
   + /* max # of channels */
   + host-max_channel = STORVSC_FC_MAX_CHANNELS - 1;
 
  I don't think these comments add any value..
 
 I will get rid of the comments.
 
 
  Also any reason you use off by one defines for max_channel, but not
  the others?
 
 No particular reason; I will clean this up.

On further examination max_channel is the maximum number of channels including 
channel 0. Thus the value set for
max_channel is correct. max_id appears to indicate the limit. In 
scsi_scan_channel the loop control  is (id  max_id) and
hence the value I have here is correct. max_lun is also used like max_id to 
indicate the limit. In scsi_sequential_lun_scan()
the loop control is (lun  max_dev_lun) and hence I think the value I have here 
is fine.

Regards,

K. Y 

--
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