Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/raidframe Pull up following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/465e10722103
branches: netbsd-8
changeset: 952790:465e10722103
user: martin <martin%NetBSD.org@localhost>
date: Wed Feb 17 09:36:10 2021 +0000
description:
Pull up following revision(s) (requested by oster in ticket #1655):
sys/dev/raidframe/rf_reconstruct.c: revision 1.125
Fix a long long-standing off-by-one error in computing lastPSID.
SUsPerPU is only really supported for a value of 1, and since the
first PSID is 0, the last will be numStripe-1. Also update the
setting of pending_writes to reflect the change to lastPSID.
Needs pullups to -8 and -9.
diffstat:
sys/dev/raidframe/rf_reconstruct.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 1077e8a0b5b7 -r 465e10722103 sys/dev/raidframe/rf_reconstruct.c
--- a/sys/dev/raidframe/rf_reconstruct.c Thu Feb 11 13:05:16 2021 +0000
+++ b/sys/dev/raidframe/rf_reconstruct.c Wed Feb 17 09:36:10 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconstruct.c,v 1.121 2014/11/14 14:29:16 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.121.12.1 2021/02/17 09:36:10 martin Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.121 2014/11/14 14:29:16 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.121.12.1 2021/02/17 09:36:10 martin Exp $");
#include <sys/param.h>
#include <sys/time.h>
@@ -616,7 +616,7 @@
mapPtr = raidPtr->reconControl->reconMap;
incPSID = RF_RECONMAP_SIZE;
- lastPSID = raidPtr->Layout.numStripe / raidPtr->Layout.SUsPerPU;
+ lastPSID = raidPtr->Layout.numStripe / raidPtr->Layout.SUsPerPU - 1;
RUsPerPU = raidPtr->Layout.SUsPerPU / raidPtr->Layout.SUsPerRU;
recon_error = 0;
write_error = 0;
@@ -631,7 +631,7 @@
raidPtr->reconControl->lastPSID = lastPSID;
if (pending_writes > lastPSID)
- pending_writes = lastPSID;
+ pending_writes = lastPSID + 1;
/* start the actual reconstruction */
@@ -796,7 +796,6 @@
pending_writes = lastPSID - prev;
raidPtr->reconControl->lastPSID = lastPSID;
}
-
/* back down curPSID to get ready for the next round... */
for (i = 0; i < raidPtr->numCol; i++) {
if (i != col) {
Home |
Main Index |
Thread Index |
Old Index