Add support for RAID-4. This is the only change which is needed for

RAID-4 support: the rest is just configuration management.

Requested-by:	peter
Approved-by:	jkh
This commit is contained in:
grog 2000-02-29 06:14:06 +00:00
parent cfb091758d
commit 3d8bb945e8

View File

@ -157,9 +157,12 @@ bre5(struct request *rq,
m.stripebase = *diskaddr - m.stripeoffset;
/* subdisk containing the parity stripe */
m.psdno = plex->subdisks - 1
- (*diskaddr / (plex->stripesize * (plex->subdisks - 1)))
% plex->subdisks;
if (plex->organization == plex_raid5)
m.psdno = plex->subdisks - 1
- (*diskaddr / (plex->stripesize * (plex->subdisks - 1)))
% plex->subdisks;
else /* RAID-4 */
m.psdno = plex->subdisks - 1;
/*
* The number of the subdisk in which