Messages in this thread Patch in this message | | | Date | Thu, 10 Apr 2003 13:54:33 -0700 | From | "Randy.Dunlap" <> | Subject | Re: [patch for playing] Patch to support 4000 disks and maintain backward compatibility |
| |
On Thu, 10 Apr 2003 13:39:49 -0700 Badari Pulavarty <pbadari@us.ibm.com> wrote:
| Here is the (sd) patch to support > 4000 disks on 32-bit dev_t work | in 2.5.67-mm tree. | | This patch addresses the backward compatibility with device nodes | issue. All the new disks will be addressed by only last major. | | SCSI has 16 majors. Each major supports 16 disks currently. | This patch leaves this assumption for first 15 majors and all the | new disks addressable by 32/64 dev_t work will be added to | SCSI last major#. This way, we don't need to create device | nodes in /dev, if you switch between 2.4 and 2.5. | | Any comments ?
#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)
@@ -85,7 +87,7 @@ struct scsi_disk { static LIST_HEAD(sd_devlist); static spinlock_t sd_devlist_lock = SPIN_LOCK_UNLOCKED; -static unsigned long sd_index_bits[SD_DISKS / BITS_PER_LONG]; +static unsigned long sd_index_bits[TOTAL_SD_DISKS / BITS_PER_LONG]; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ~~~~~ If there's any chance that TOTAL_SD_DISKS is not a multiple of BITS_PER_LONG, then the value above should better be
(TOTAL_SD_DISKS + BITS_PER_LONG - 1) / BITS_PER_LONG
-- ~Randy ['tangent' is not a verb...unless you believe that "in English any noun can be verbed."] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |