diff -b -r -U 5 --exclude=*.o --exclude=.??* linux-2.4.12-ac3/drivers/md/multipath.c linux-2.4.12-ac3-md/drivers/md/multipath.c --- linux-2.4.12-ac3/drivers/md/multipath.c Fri Oct 26 15:18:50 2001 +++ linux-2.4.12-ac3-md/drivers/md/multipath.c Tue Oct 23 06:12:15 2001 @@ -58,12 +58,10 @@ static struct ctl_table_header *multipath_table_header; static struct multipath_dev_table multipath_dev_template = { "", { - {MULTIPATH_ROUTING, "routing", NULL, sizeof(int), 0644, - NULL, &proc_dointvec}, {MULTIPATH_CONF, "config", NULL, 0, 0444, NULL, &multipath_proc_read_dev}, {0}, }, {{MULTIPATH_DEV, NULL, NULL, 0, 0555, NULL},{0}}, @@ -106,11 +104,10 @@ /* fill in fields */ sprintf( t->mdname, "%d", md->__minor ); t->dir[0].procname = t->mdname; - t->md[0].data = &conf->routing; t->md[1].data = md; t->dev[0].child = t->mp; t->mp[0].child = t->dir; t->dir[0].child = t->md; @@ -435,11 +432,12 @@ { multipath_conf_t *conf = mddev_to_conf(mddev); int i, disks = MD_SB_DISKS; /* - * Later we do 'routing' now we use the first available disk. + * Later we do read balancing on the read side + * now we use the first available disk. */ for (i = 0; i < disks; i++) { if (conf->multipaths[i].operational) { *rdev = conf->multipaths[i].dev; @@ -559,43 +557,17 @@ * This should be changed to be device based. Also atomic sequential * reads should be somehow balanced. */ - -static int multipath_path_select (multipath_conf_t *conf) +static int multipath_read_balance (multipath_conf_t *conf) { - struct multipath_info *info; - int disk, next; + int disk; - switch( conf->routing ) - { - case 0: /* prefered route method */ for (disk = 0; disk < conf->raid_disks; disk++) if (conf->multipaths[disk].operational) return disk; - - case 1: /* round robin method */ - for (disk = 0; disk < conf->nr_disks; disk++) - if (conf->multipaths[disk].operational) - break; - - if (conf->multipaths[disk].operational) - { - if (disk == conf->nr_disks) - next = 0; - else - next = disk + 1; - - conf->multipaths[disk].operational = 0; - conf->multipaths[next].operational = 1; - return next; - } - break; - default: - break; - } BUG(); return 0; } static int multipath_make_request (mddev_t *mddev, int rw, @@ -638,23 +610,18 @@ * i think the read and write branch should be separated completely, * since we want to do read balancing on the read side for example. * Alternative implementations? :) --mingo */ - /* I am confused by the previous comment, for multipath, read - * balancing is not really a useful concept. It seems to me that - * what needs to be done here, is route selection. -beattie- - */ - r1_bh->master_bh = bh; r1_bh->mddev = mddev; r1_bh->cmd = rw; /* * read balancing logic: */ - multipath = conf->multipaths + multipath_path_select(conf); + multipath = conf->multipaths + multipath_read_balance(conf); bh_req = &r1_bh->bh_req; memcpy(bh_req, bh, sizeof(*bh)); bh_req->b_blocknr = bh->b_rsector; bh_req->b_dev = multipath->dev; diff -b -r -U 5 --exclude=*.o --exclude=.??* linux-2.4.12-ac3/include/linux/autoconf.h linux-2.4.12-ac3-md/include/linux/autoconf.h --- linux-2.4.12-ac3/include/linux/autoconf.h Tue Oct 23 07:29:57 2001 +++ linux-2.4.12-ac3-md/include/linux/autoconf.h Wed Oct 17 09:08:49 2001 @@ -1,7 +1,7 @@ /* - * Automatically generated C config: don't edit + * Automatically generated by make menuconfig: don't edit */ #define AUTOCONF_INCLUDED #define CONFIG_X86 1 #define CONFIG_ISA 1 #undef CONFIG_SBUS @@ -166,14 +166,10 @@ #undef CONFIG_NET_IPIP #undef CONFIG_NET_IPGRE #undef CONFIG_IP_MROUTE #undef CONFIG_INET_ECN #undef CONFIG_SYN_COOKIES - -/* - * - */ #undef CONFIG_IPX #undef CONFIG_ATALK #undef CONFIG_DECNET #undef CONFIG_BRIDGE @@ -196,14 +192,10 @@ /* * IDE, ATA and ATAPI Block devices */ #define CONFIG_BLK_DEV_IDE 1 - -/* - * Please see Documentation/ide.txt for help/info on IDE drives - */ #undef CONFIG_BLK_DEV_HD_IDE #undef CONFIG_BLK_DEV_HD #define CONFIG_BLK_DEV_IDEDISK 1 #define CONFIG_IDEDISK_MULTI_MODE 1 #undef CONFIG_BLK_DEV_IDEDISK_VENDOR @@ -218,14 +210,10 @@ #undef CONFIG_BLK_DEV_IDECS #define CONFIG_BLK_DEV_IDECD 1 #undef CONFIG_BLK_DEV_IDETAPE #undef CONFIG_BLK_DEV_IDEFLOPPY #undef CONFIG_BLK_DEV_IDESCSI - -/* - * IDE chipset support/bugfixes - */ #define CONFIG_BLK_DEV_CMD640 1 #undef CONFIG_BLK_DEV_CMD640_ENHANCED #undef CONFIG_BLK_DEV_ISAPNP #define CONFIG_BLK_DEV_RZ1000 1 #define CONFIG_BLK_DEV_IDEPCI 1 @@ -272,24 +260,16 @@ /* * SCSI support */ #define CONFIG_SCSI 1 - -/* - * SCSI support type (disk, tape, CD-ROM) - */ #define CONFIG_BLK_DEV_SD 1 #define CONFIG_SD_EXTRA_DEVS (40) #undef CONFIG_CHR_DEV_ST #undef CONFIG_CHR_DEV_OSST #undef CONFIG_BLK_DEV_SR #define CONFIG_CHR_DEV_SG 1 - -/* - * Some SCSI devices (e.g. CD jukebox) support multiple LUNs - */ #define CONFIG_SCSI_DEBUG_QUEUES 1 #define CONFIG_SCSI_MULTI_LUN 1 #define CONFIG_SCSI_CONSTANTS 1 #define CONFIG_SCSI_LOGGING 1 @@ -521,18 +501,10 @@ /* * Joysticks */ #undef CONFIG_INPUT_GAMEPORT - -/* - * Input core support is needed for gameports - */ - -/* - * Input core support is needed for joysticks - */ #undef CONFIG_QIC02_TAPE /* * Watchdog Cards */ @@ -700,21 +672,13 @@ /* * USB support */ #undef CONFIG_USB - -/* - * USB Controllers - */ #undef CONFIG_USB_UHCI #undef CONFIG_USB_UHCI_ALT #undef CONFIG_USB_OHCI - -/* - * USB Device Class drivers - */ #undef CONFIG_USB_AUDIO #undef CONFIG_USB_BLUETOOTH #undef CONFIG_USB_STORAGE #undef CONFIG_USB_STORAGE_DEBUG #undef CONFIG_USB_STORAGE_DATAFAB @@ -722,49 +686,21 @@ #undef CONFIG_USB_STORAGE_ISD200 #undef CONFIG_USB_STORAGE_JUMPSHOT #undef CONFIG_USB_STORAGE_DPCM #undef CONFIG_USB_ACM #undef CONFIG_USB_PRINTER - -/* - * USB Human Interface Devices (HID) - */ - -/* - * Input core support is needed for USB HID - */ - -/* - * USB Imaging devices - */ #undef CONFIG_USB_DC2XX #undef CONFIG_USB_MDC800 #undef CONFIG_USB_SCANNER #undef CONFIG_USB_MICROTEK #undef CONFIG_USB_HPUSBSCSI - -/* - * USB Multimedia devices - */ - -/* - * Video4Linux support is needed for USB Multimedia device support - */ - -/* - * USB Network adaptors - */ #undef CONFIG_USB_PLUSB #undef CONFIG_USB_PEGASUS #undef CONFIG_USB_KAWETH #undef CONFIG_USB_CATC #undef CONFIG_USB_CDCETHER #undef CONFIG_USB_USBNET - -/* - * USB port drivers - */ #undef CONFIG_USB_USS720 /* * USB Serial Converter support */ @@ -791,14 +727,10 @@ #undef CONFIG_USB_SERIAL_MCT_U232 #undef CONFIG_USB_SERIAL_PL2303 #undef CONFIG_USB_SERIAL_CYBERJACK #undef CONFIG_USB_SERIAL_XIRCOM #undef CONFIG_USB_SERIAL_OMNINET - -/* - * Miscellaneous USB drivers - */ #undef CONFIG_USB_RIO500 #undef CONFIG_USB_ID75 /* * Kernel hacking diff -b -r -U 5 --exclude=*.o --exclude=.??* linux-2.4.12-ac3/include/linux/raid/md_p.h linux-2.4.12-ac3-md/include/linux/raid/md_p.h --- linux-2.4.12-ac3/include/linux/raid/md_p.h Fri Oct 26 10:21:34 2001 +++ linux-2.4.12-ac3-md/include/linux/raid/md_p.h Tue Nov 14 13:16:37 2000 @@ -142,16 +142,13 @@ */ __u32 layout; /* 0 the array's physical layout */ __u32 chunk_size; /* 1 chunk size in bytes */ __u32 root_pv; /* 2 LV root PV */ __u32 root_block; /* 3 LV root block */ - __u32 routing; /* 4 routing algorithim for multipath drive */ - __u32 routing_param; /* 5 data (if needed) for routing */ - __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 6]; + __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 4]; /* - * Disks information */ mdp_disk_t disks[MD_SB_DISKS]; /* diff -b -r -U 5 --exclude=*.o --exclude=.??* linux-2.4.12-ac3/include/linux/raid/multipath.h linux-2.4.12-ac3-md/include/linux/raid/multipath.h --- linux-2.4.12-ac3/include/linux/raid/multipath.h Fri Oct 26 15:24:42 2001 +++ linux-2.4.12-ac3-md/include/linux/raid/multipath.h Tue Oct 23 06:11:44 2001 @@ -61,13 +61,10 @@ int window; md_wait_queue_head_t wait_done; md_wait_queue_head_t wait_ready; md_spinlock_t segment_lock; int last; /* last used, or prefered route */ - int routing; /* routing algorithim 0 = prefered route */ - /* 1 = round robin etc... */ - int routing_param; /* parameter for the above (if needed) */ struct ctl_table_header *tbl; struct multipath_dev_table ctl_tbl; }; typedef struct multipath_private_data multipath_conf_t;