Thread (8 messages) 8 messages, 2 authors, 2002-04-23

Re: 2 HBA's and Multipath.

From: Luca Berra <hidden>
Date: 2002-04-11 09:49:59

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
 / \
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help