linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jeffm@suse.de (Jeff Mahoney)
To: Linux SCSI <linux-scsi@vger.kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	Kai Makisara <Kai.Makisara@kolumbus.fi>,
	Lee Duncan <lduncan@suse.com>, Rob Evers <revers@redhat.com>
Subject: [patch 5/5] [PATCH 5/5] st: raise device limit
Date: Sat, 18 Aug 2012 15:20:41 -0400	[thread overview]
Message-ID: <20120818192044.746014978@suse.com> (raw)
In-Reply-To: 20120818192036.751334179@suse.com

[-- Attachment #1: st-raise-device-limit --]
[-- Type: text/plain, Size: 1631 bytes --]

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.

Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 Documentation/scsi/st.txt |    6 ++----
 drivers/scsi/st.h         |    2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -112,10 +112,8 @@ attempted).
 
 MINOR NUMBERS
 
-The tape driver currently supports 128 drives by default. This number
-can be increased by editing st.h and recompiling the driver if
-necessary. The upper limit is 2^17 drives if 4 modes for each drive
-are used.
+The tape driver currently supports up to 2^17 drives if 4 modes for
+each drive are used.
 
 The minor numbers consist of the following bit fields:
 
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -78,7 +78,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 */



  parent reply	other threads:[~2012-08-18 19:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-18 19:20 [patch 0/5] st: Clean up and raise max device limit (v4) Jeff Mahoney
2012-08-18 19:20 ` [patch 1/5] [PATCH 1/5] st: Use static class attributes Jeff Mahoney
2012-08-18 19:20 ` [patch 2/5] [PATCH 2/5] st: clean up dev cleanup in st_probe Jeff Mahoney
2012-08-18 19:20 ` [patch 3/5] [PATCH 3/5] st: get rid of scsi_tapes array Jeff Mahoney
2012-08-18 19:20 ` [patch 4/5] [PATCH 4/5] st: clean up device file creation and removal Jeff Mahoney
2012-08-18 19:20 ` Jeff Mahoney [this message]
2012-08-20 19:55 ` [patch 0/5] st: Clean up and raise max device limit (v4) Kai Makisara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120818192044.746014978@suse.com \
    --to=jeffm@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=revers@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).