linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] st: raise device limit
@ 2012-05-17  3:57 Lee Duncan
  0 siblings, 0 replies; only message in thread
From: Lee Duncan @ 2012-05-17  3:57 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel, kai.makisara, jeffm

The device limit of 128 tape drives was established in 2003 as a
significant increase from the 8 tape drives allowed previously.

We're seeing customer sites that between a large number of drives
and multipath are discovering more than 128 devices and running
into problems.

Now that we're not stuck having to store a pointer in array
and aren't limited by kmalloc failing on higher order allocs we can
lift the limit to fill the entire minor range based on the number
of modes.

Based on the current code, that's 2^17 devices.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
---
 drivers/scsi/st.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 4456735..2092f93 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -77,7 +77,7 @@ struct st_modedef {
 #define ST_MODE_SHIFT (7 - ST_NBR_MODE_BITS)
 #define ST_MODE_MASK ((ST_NBR_MODES - 1) << ST_MODE_SHIFT)
 
-#define ST_MAX_TAPES 128
+#define ST_MAX_TAPES (1 << (20 - (ST_NBR_MODE_BITS + 1)))
 #define ST_MAX_TAPE_ENTRIES  (ST_MAX_TAPES << (ST_NBR_MODE_BITS + 1))
 
 /* The status related to each partition */
-- 
1.7.9.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-17  3:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17  3:57 [PATCH 5/5] st: raise device limit Lee Duncan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).