On Mon, Apr 08, 2002 at 03:03:00PM -0500, SoulBlazer wrote: > What about write balancing ? > > I would also be interested in discussing a possible patch to the raid code to > do write/read balancing over N hba's if it is that trivial. the multipath_read_balance routine is actually used both for reading and writing besides with multipath we don't need to check the head position of the disk since they are supposed to be the same (if the concept of head position has any sense with your storage, which i strongly doubt). what we would need is adding an int last_used; to struct multipath_private_data in include/linux/raid/multipath.h then rewrite multipath_read_balance in drivers/md/multipath.c to look something like this. static int multipath_read_balance (multipath_conf_t *conf) { int disk; for (disk = conf->last_used + 1; disk != conf->last_used; disk++) { if (disk > conf->raid_disks) disk = 0; if (conf->multipaths[disk].operational) return disk; } BUG(); return 0; } that's all folks, unless i did some very big fuck-up in the code -- Luca Berra -- bluca@comedia.it Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \ - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html