Linus,
 md currently has two #defines which give a limit to the number of
 devices that can be in a given raid array:

  MAX_REAL (==12) dates back to the time before we had persistent
     superblocks, and mostly affects raid0
 
  MD_SB_DISKS (==27) is a characteristic of the newer persistent
     superblocks and says how many devices can be described in a
     superblock.

 Have the two is inconsistent and needlessly limits raid0 arrays.
 This patch replaces MAX_REAL in the few places that it occurs with
 MD_SB_DISKS. 

 Thanks to Gary Murakami <[EMAIL PROTECTED]> for prodding me to
 make this patch.

NeilBrown



--- ./include/linux/raid/md_k.h 2000/11/29 04:54:32     1.1
+++ ./include/linux/raid/md_k.h 2000/11/29 04:55:47     1.2
@@ -59,7 +59,6 @@
 #error MD doesnt handle bigger kdev yet
 #endif
 
-#define MAX_REAL     12                        /* Max number of disks per md dev */
 #define MAX_MD_DEVS  (1<<MINORBITS)    /* Max number of md dev */
 
 /*
--- ./include/linux/raid/raid0.h        2000/11/29 04:54:32     1.1
+++ ./include/linux/raid/raid0.h        2000/11/29 04:55:47     1.2
@@ -9,7 +9,7 @@
        unsigned long dev_offset;       /* Zone offset in real dev */
        unsigned long size;             /* Zone size */
        int nb_dev;                     /* # of devices attached to the zone */
-       mdk_rdev_t *dev[MAX_REAL]; /* Devices attached to the zone */
+       mdk_rdev_t *dev[MD_SB_DISKS]; /* Devices attached to the zone */
 };
 
 struct raid0_hash
--- ./drivers/md/md.c   2000/11/29 04:49:29     1.3
+++ ./drivers/md/md.c   2000/11/29 04:55:47     1.4
@@ -3587,9 +3587,9 @@
 {
        static char * name = "mdrecoveryd";
        
-       printk (KERN_INFO "md driver %d.%d.%d MAX_MD_DEVS=%d, MAX_REAL=%d\n",
+       printk (KERN_INFO "md driver %d.%d.%d MAX_MD_DEVS=%d, MD_SB_DISKS=%d\n",
                        MD_MAJOR_VERSION, MD_MINOR_VERSION,
-                       MD_PATCHLEVEL_VERSION, MAX_MD_DEVS, MAX_REAL);
+                       MD_PATCHLEVEL_VERSION, MAX_MD_DEVS, MD_SB_DISKS);
 
        if (devfs_register_blkdev (MAJOR_NR, "md", &md_fops))
        {
@@ -3639,7 +3639,7 @@
        unsigned long set;
        int pers[MAX_MD_BOOT_DEVS];
        int chunk[MAX_MD_BOOT_DEVS];
-       kdev_t devices[MAX_MD_BOOT_DEVS][MAX_REAL];
+       kdev_t devices[MAX_MD_BOOT_DEVS][MD_SB_DISKS];
 } md_setup_args md__initdata = { 0, };
 
 /*
@@ -3713,7 +3713,7 @@
                pername="super-block";
        }
        devnames = str;
-       for (; i<MAX_REAL && str; i++) {
+       for (; i<MD_SB_DISKS && str; i++) {
                if ((device = name_to_kdev_t(str))) {
                        md_setup_args.devices[minor][i] = device;
                } else {
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to