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:
Greg Lehey 2000-02-29 06:14:06 +00:00
parent e08bedf9bf
commit 857b0d4e21
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57597

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