summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_raid4.c
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2003-12-29 02:38:17 +0000
committeroster <oster@NetBSD.org>2003-12-29 02:38:17 +0000
commit10f077a0fb8ef59202e299d65d807c9e050dd4ff (patch)
tree80ffb9b4d4556ea201be9bb5db9565fca716f29f /sys/dev/raidframe/rf_raid4.c
parentd7035f6c9a4cd7330360127a1a450d97de05817e (diff)
[Having received a definite lack of strenuous objection, a small amount
of strenuous agreement, and some general agreement, this commit is going ahead because it's now starting to block some other changes I wish to make.] Remove most of the support for the concept of "rows" from RAIDframe. While the "row" interface has been exported to the world, RAIDframe internals have really only supported a single row, even though they have feigned support of multiple rows. Nothing changes in configuration land -- config files still need to specify a single row, etc. All auto-config structures remain fully forward/backwards compatible. The only visible difference to the average user should be a reduction in the size of a GENERIC kernel (i386) by 4.5K. For those of us trolling through RAIDframe kernel code, a lot of the driver configuration code has become a LOT easier to read.
Diffstat (limited to 'sys/dev/raidframe/rf_raid4.c')
-rw-r--r--sys/dev/raidframe/rf_raid4.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/raidframe/rf_raid4.c b/sys/dev/raidframe/rf_raid4.c
index c68d231d636..45493c2f1e4 100644
--- a/sys/dev/raidframe/rf_raid4.c
+++ b/sys/dev/raidframe/rf_raid4.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_raid4.c,v 1.6 2002/09/23 02:40:09 oster Exp $ */
+/* $NetBSD: rf_raid4.c,v 1.7 2003/12/29 02:38:18 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
***************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_raid4.c,v 1.6 2002/09/23 02:40:09 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_raid4.c,v 1.7 2003/12/29 02:38:18 oster Exp $");
#include "rf_raid.h"
#include "rf_dag.h"
@@ -76,8 +76,6 @@ rf_ConfigureRAID4(
for (i = 0; i < raidPtr->numCol; i++)
info->stripeIdentifier[i] = i;
- RF_ASSERT(raidPtr->numRow == 1);
-
/* fill in the remaining layout parameters */
layoutPtr->numStripe = layoutPtr->stripeUnitsPerDisk;
layoutPtr->numDataCol = raidPtr->numCol - 1;
@@ -104,13 +102,11 @@ void
rf_MapSectorRAID4(
RF_Raid_t * raidPtr,
RF_RaidAddr_t raidSector,
- RF_RowCol_t * row,
RF_RowCol_t * col,
RF_SectorNum_t * diskSector,
int remap)
{
RF_StripeNum_t SUID = raidSector / raidPtr->Layout.sectorsPerStripeUnit;
- *row = 0;
*col = SUID % raidPtr->Layout.numDataCol;
*diskSector = (SUID / (raidPtr->Layout.numDataCol)) * raidPtr->Layout.sectorsPerStripeUnit +
(raidSector % raidPtr->Layout.sectorsPerStripeUnit);
@@ -120,14 +116,12 @@ void
rf_MapParityRAID4(
RF_Raid_t * raidPtr,
RF_RaidAddr_t raidSector,
- RF_RowCol_t * row,
RF_RowCol_t * col,
RF_SectorNum_t * diskSector,
int remap)
{
RF_StripeNum_t SUID = raidSector / raidPtr->Layout.sectorsPerStripeUnit;
- *row = 0;
*col = raidPtr->Layout.numDataCol;
*diskSector = (SUID / (raidPtr->Layout.numDataCol)) * raidPtr->Layout.sectorsPerStripeUnit +
(raidSector % raidPtr->Layout.sectorsPerStripeUnit);
@@ -137,12 +131,10 @@ void
rf_IdentifyStripeRAID4(
RF_Raid_t * raidPtr,
RF_RaidAddr_t addr,
- RF_RowCol_t ** diskids,
- RF_RowCol_t * outRow)
+ RF_RowCol_t ** diskids)
{
RF_Raid4ConfigInfo_t *info = raidPtr->Layout.layoutSpecificInfo;
- *outRow = 0;
*diskids = info->stripeIdentifier;
}