From: Andries.Brouwer@cwi.nl
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
pbadari@us.ibm.com
Subject: Re: [patch for playing] Patch to support 4000 disks and maintain backward compatibility
Date: Fri, 11 Apr 2003 00:09:51 +0200 (MEST) [thread overview]
Message-ID: <UTC200304102209.h3AM9pf11795.aeb@smtp.cwi.nl> (raw)
[I noticed that I have been unsubscribed for a day or so,
so may not have seen earlier mail.]
From: Badari Pulavarty <pbadari@us.ibm.com>
--- linux-2.5.67/drivers/scsi/sd.c Wed Apr 9 13:12:38 2003
+++ linux-2.5.67.new/drivers/scsi/sd.c Thu Apr 10 13:23:49 2003
@@ -56,7 +56,9 @@
* Remaining dev_t-handling stuff
*/
#define SD_MAJORS 16
-#define SD_DISKS (SD_MAJORS << 4)
+#define SD_DISKS ((SD_MAJORS - 1) << 4)
+#define LAST_MAJOR_DISKS (1 << (KDEV_MINOR_BITS - 4))
+#define TOTAL_SD_DISKS (SD_DISKS + LAST_MAJOR_DISKS)
-static unsigned long sd_index_bits[SD_DISKS / BITS_PER_LONG];
+static unsigned long sd_index_bits[TOTAL_SD_DISKS / BITS_PER_LONG];
I try to make sure there are no assumptions about the
size or structure of device numbers anywhere outside kdev_t.h.
In particular I object to the use of KDEV_MINOR_BITS.
Apart from this formal point, there is also the practical point:
suppose 64 = 32+32 is used, so that KDEV_MINOR_BITS equals 32.
Then LAST_MAJOR_DISKS is 2^28 and sd_index_bits[] would be 32 MB array.
Unreasonable.
The conclusion is that the easy way out is to define MAX_NR_DISKS.
A different way out, especially when we use 32+32, is to kill this
sd_index_bits[] array, and give each disk a new number: replace
index = find_first_zero_bit(sd_index_bits, SD_DISKS);
by
index = next_index++;
Andries
next reply other threads:[~2003-04-10 21:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-10 22:09 Andries.Brouwer [this message]
2003-04-10 22:22 ` Badari Pulavarty
2003-04-10 23:57 ` Roman Zippel
-- strict thread matches above, loose matches on Subject: below --
2003-04-13 13:59 Paul McKenney
2003-04-12 1:13 Paul McKenney
2003-04-12 14:14 ` James Bottomley
2003-04-11 21:13 Andries.Brouwer
2003-04-11 19:45 Andries.Brouwer
2003-04-11 20:14 ` James Bottomley
2003-04-11 23:21 ` Joel Becker
2003-04-11 18:07 Andries.Brouwer
2003-04-11 19:12 ` James Bottomley
2003-04-11 11:42 Andries.Brouwer
2003-04-11 14:33 ` James Bottomley
2003-04-11 16:21 ` Badari Pulavarty
2003-04-11 0:13 Andries.Brouwer
2003-04-10 23:53 Andries.Brouwer
2003-04-11 1:09 ` Badari Pulavarty
2003-04-11 10:09 ` Douglas Gilbert
2003-04-11 16:12 ` Badari Pulavarty
2003-04-10 23:33 Andries.Brouwer
2003-04-10 23:37 ` Badari Pulavarty
2003-04-10 23:09 Andries.Brouwer
2003-04-10 23:16 ` Badari Pulavarty
2003-04-10 20:39 Badari Pulavarty
2003-04-10 20:54 ` Randy.Dunlap
2003-04-11 0:08 ` Roman Zippel
2003-04-11 1:25 ` Badari Pulavarty
2003-04-11 15:43 ` Joel Becker
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=UTC200304102209.h3AM9pf11795.aeb@smtp.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=pbadari@us.ibm.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
all inboxes | Powered by JetHome®