[PATCH V1 7/7] Drivers: scsi: storvsc: Increase the value of STORVSC_MAX_IO_REQUESTS

2013-05-16 Thread K. Y. Srinivasan
Increase the value of STORVSC_MAX_IO_REQUESTS to 200 requests. The current
ringbuffer size can support this higher value.

Signed-off-by: K. Y. Srinivasan k...@microsoft.com
Reviewed-by: Haiyang Zhang haiya...@microsoft.com
---
 drivers/scsi/storvsc_drv.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 124cf0b..e2ab7cd 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -328,7 +328,7 @@ static int storvsc_timeout = 180;
 module_param(storvsc_timeout, uint, (S_IRUGO | S_IWUSR));
 MODULE_PARM_DESC(storvsc_timeout, Device timeout (seconds));
 
-#define STORVSC_MAX_IO_REQUESTS128
+#define STORVSC_MAX_IO_REQUESTS200
 
 static void storvsc_on_channel_callback(void *context);
 
-- 
1.7.4.1

--
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 V1 7/7] Drivers: scsi: storvsc: Increase the value of STORVSC_MAX_IO_REQUESTS

2013-05-16 Thread Dan Carpenter
On Thu, May 16, 2013 at 05:21:19AM -0700, K. Y. Srinivasan wrote:
 Increase the value of STORVSC_MAX_IO_REQUESTS to 200 requests. The current
 ringbuffer size can support this higher value.
 

The ringbuffer size is a module parameter so it's odd to talk about
the current size.

regards,
dan carpenter

--
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 V1 7/7] Drivers: scsi: storvsc: Increase the value of STORVSC_MAX_IO_REQUESTS

2013-05-16 Thread KY Srinivasan


 -Original Message-
 From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
 Sent: Thursday, May 16, 2013 8:02 AM
 To: KY Srinivasan
 Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; oher...@suse.com; jbottom...@parallels.com;
 h...@infradead.org; linux-scsi@vger.kernel.org; a...@canonical.com;
 jasow...@redhat.com
 Subject: Re: [PATCH V1 7/7] Drivers: scsi: storvsc: Increase the value of
 STORVSC_MAX_IO_REQUESTS
 
 On Thu, May 16, 2013 at 05:21:19AM -0700, K. Y. Srinivasan wrote:
  Increase the value of STORVSC_MAX_IO_REQUESTS to 200 requests. The
 current
  ringbuffer size can support this higher value.
 
 
 The ringbuffer size is a module parameter so it's odd to talk about
 the current size.

While the ringbuffer size is a module parameter; there is a default value. The 
current size refers to the default. 
Your comment applies to the current value (of 128) as well in that it is 
possible for somebody to load this
driver  with a ringbuffer size that could not support  the value of 128. If 
this  is the case, we fail the load.
This safety check continues to exist. 

Regards,

K. Y
 
 regards,
 dan carpenter
 
 


--
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 V1 7/7] Drivers: scsi: storvsc: Increase the value of STORVSC_MAX_IO_REQUESTS

2013-05-16 Thread Dan Carpenter
On Thu, May 16, 2013 at 01:37:41PM +, KY Srinivasan wrote:
 
 
  -Original Message-
  From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
  Sent: Thursday, May 16, 2013 8:02 AM
  To: KY Srinivasan
  Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
  de...@linuxdriverproject.org; oher...@suse.com; jbottom...@parallels.com;
  h...@infradead.org; linux-scsi@vger.kernel.org; a...@canonical.com;
  jasow...@redhat.com
  Subject: Re: [PATCH V1 7/7] Drivers: scsi: storvsc: Increase the value of
  STORVSC_MAX_IO_REQUESTS
  
  On Thu, May 16, 2013 at 05:21:19AM -0700, K. Y. Srinivasan wrote:
   Increase the value of STORVSC_MAX_IO_REQUESTS to 200 requests. The
  current
   ringbuffer size can support this higher value.
  
  
  The ringbuffer size is a module parameter so it's odd to talk about
  the current size.
 
 While the ringbuffer size is a module parameter; there is a default value. 
 The current size refers to the default. 
 Your comment applies to the current value (of 128) as well in that it is 
 possible for somebody to load this
 driver  with a ringbuffer size that could not support  the value of 128. If 
 this  is the case, we fail the load.
 This safety check continues to exist. 

The issue is there in the original code, true.

Would the right fix be to add some sanity checks in module_init()?

regards,
dan carpenter

--
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 V1 7/7] Drivers: scsi: storvsc: Increase the value of STORVSC_MAX_IO_REQUESTS

2013-05-16 Thread KY Srinivasan


 -Original Message-
 From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
 Sent: Thursday, May 16, 2013 9:55 AM
 To: KY Srinivasan
 Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; oher...@suse.com; jbottom...@parallels.com;
 h...@infradead.org; linux-scsi@vger.kernel.org; a...@canonical.com;
 jasow...@redhat.com
 Subject: Re: [PATCH V1 7/7] Drivers: scsi: storvsc: Increase the value of
 STORVSC_MAX_IO_REQUESTS
 
 On Thu, May 16, 2013 at 01:37:41PM +, KY Srinivasan wrote:
 
 
   -Original Message-
   From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
   Sent: Thursday, May 16, 2013 8:02 AM
   To: KY Srinivasan
   Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
   de...@linuxdriverproject.org; oher...@suse.com;
 jbottom...@parallels.com;
   h...@infradead.org; linux-scsi@vger.kernel.org; a...@canonical.com;
   jasow...@redhat.com
   Subject: Re: [PATCH V1 7/7] Drivers: scsi: storvsc: Increase the value of
   STORVSC_MAX_IO_REQUESTS
  
   On Thu, May 16, 2013 at 05:21:19AM -0700, K. Y. Srinivasan wrote:
Increase the value of STORVSC_MAX_IO_REQUESTS to 200 requests. The
   current
ringbuffer size can support this higher value.
   
  
   The ringbuffer size is a module parameter so it's odd to talk about
   the current size.
 
  While the ringbuffer size is a module parameter; there is a default value. 
  The
 current size refers to the default.
  Your comment applies to the current value (of 128) as well in that it is 
  possible
 for somebody to load this
  driver  with a ringbuffer size that could not support  the value of 128. If 
  this  is
 the case, we fail the load.
  This safety check continues to exist.
 
 The issue is there in the original code, true.
 
 Would the right fix be to add some sanity checks in module_init()?

The check is already there (as I noted above). Look at the function:
storvsc_drv_init(). If the ring size is picked incorrectly, the load is failed.

Regards,

K. Y
 
 regards,
 dan carpenter
 
 


--
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 V1 7/7] Drivers: scsi: storvsc: Increase the value of STORVSC_MAX_IO_REQUESTS

2013-05-16 Thread Dan Carpenter
On Thu, May 16, 2013 at 02:01:12PM +, KY Srinivasan wrote:
  Would the right fix be to add some sanity checks in module_init()?
 
 The check is already there (as I noted above). Look at the function:
 storvsc_drv_init(). If the ring size is picked incorrectly, the load is 
 failed.
 

Ah.  I see that now.  My mistake.

regards,
dan carpenter

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