summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2006-10-07 17:42:53 +0000
committeroster <oster@NetBSD.org>2006-10-07 17:42:53 +0000
commit71b8d6a6de5c2bb3e1b32ccd87f7aadb114f180f (patch)
tree1689725e75d4cac5ded38bec43c99cd7d0efb59a /sys/dev/raidframe
parentfb0de0c946f3ed19d338b4a1da3f839fa3943fd8 (diff)
It's ok to wait for memory for the emergency buffers. If we don't get
that memory, fail harder, and bail on configuring the RAID array. Addresses PR#25787.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_driver.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c
index 500eb56e566..f6cfc052f18 100644
--- a/sys/dev/raidframe/rf_driver.c
+++ b/sys/dev/raidframe/rf_driver.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_driver.c,v 1.110 2006/02/14 01:13:33 oster Exp $ */
+/* $NetBSD: rf_driver.c,v 1.111 2006/10/07 17:42:53 oster Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -73,7 +73,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.110 2006/02/14 01:13:33 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.111 2006/10/07 17:42:53 oster Exp $");
#include "opt_raid_diagnostic.h"
@@ -462,7 +462,7 @@ rf_AllocEmergBuffers(RF_Raid_t *raidPtr)
for (i = 0; i < raidPtr->numEmergencyBuffers; i++) {
tmpbuf = malloc( raidPtr->Layout.sectorsPerStripeUnit <<
raidPtr->logBytesPerSector,
- M_RAIDFRAME, M_NOWAIT);
+ M_RAIDFRAME, M_WAITOK);
if (tmpbuf) {
vple = rf_AllocVPListElem();
vple->p= tmpbuf;
@@ -472,7 +472,7 @@ rf_AllocEmergBuffers(RF_Raid_t *raidPtr)
} else {
printf("raid%d: failed to allocate emergency buffer!\n",
raidPtr->raidid);
- break;
+ return 1;
}
}
@@ -481,7 +481,7 @@ rf_AllocEmergBuffers(RF_Raid_t *raidPtr)
for (i = 0; i < raidPtr->numEmergencyStripeBuffers; i++) {
tmpbuf = malloc( raidPtr->numCol * (raidPtr->Layout.sectorsPerStripeUnit <<
raidPtr->logBytesPerSector),
- M_RAIDFRAME, M_NOWAIT);
+ M_RAIDFRAME, M_WAITOK);
if (tmpbuf) {
vple = rf_AllocVPListElem();
vple->p= tmpbuf;
@@ -491,7 +491,7 @@ rf_AllocEmergBuffers(RF_Raid_t *raidPtr)
} else {
printf("raid%d: failed to allocate emergency stripe buffer!\n",
raidPtr->raidid);
- break;
+ return 1;
}
}