CVS commit: src/sys/compat/common
Module Name:src Committed By: oster Date: Sat Dec 9 20:31:57 UTC 2023 Modified Files: src/sys/compat/common: compat_90_mod.c net_inet6_nd_90.c Log Message: Allow kernels builds which don't define INET6 to compile compat bits too. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/compat_90_mod.c cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/net_inet6_nd_90.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/common
Module Name:src Committed By: oster Date: Sat Dec 9 20:31:57 UTC 2023 Modified Files: src/sys/compat/common: compat_90_mod.c net_inet6_nd_90.c Log Message: Allow kernels builds which don't define INET6 to compile compat bits too. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/compat_90_mod.c cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/net_inet6_nd_90.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_90_mod.c diff -u src/sys/compat/common/compat_90_mod.c:1.5 src/sys/compat/common/compat_90_mod.c:1.6 --- src/sys/compat/common/compat_90_mod.c:1.5 Sat Dec 9 15:21:01 2023 +++ src/sys/compat/common/compat_90_mod.c Sat Dec 9 20:31:57 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_90_mod.c,v 1.5 2023/12/09 15:21:01 pgoyette Exp $ */ +/* $NetBSD: compat_90_mod.c,v 1.6 2023/12/09 20:31:57 oster Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: compat_90_mod.c,v 1.5 2023/12/09 15:21:01 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_90_mod.c,v 1.6 2023/12/09 20:31:57 oster Exp $"); #include #include @@ -50,7 +50,9 @@ int compat_90_init(void) { +#ifdef INET6 net_inet6_nd_90_init(); +#endif return vfs_syscalls_90_init(); } @@ -63,7 +65,9 @@ compat_90_fini(void) if (error != 0) return error; +#ifdef INET6 net_inet6_nd_90_fini(); +#endif return error; } Index: src/sys/compat/common/net_inet6_nd_90.c diff -u src/sys/compat/common/net_inet6_nd_90.c:1.1 src/sys/compat/common/net_inet6_nd_90.c:1.2 --- src/sys/compat/common/net_inet6_nd_90.c:1.1 Sat Dec 9 15:21:01 2023 +++ src/sys/compat/common/net_inet6_nd_90.c Sat Dec 9 20:31:57 2023 @@ -1,6 +1,6 @@ -/* $NetBSD: net_inet6_nd_90.c,v 1.1 2023/12/09 15:21:01 pgoyette Exp $ */ +/* $NetBSD: net_inet6_nd_90.c,v 1.2 2023/12/09 20:31:57 oster Exp $ */ -/* $NetBSD: net_inet6_nd_90.c,v 1.1 2023/12/09 15:21:01 pgoyette Exp $*/ +/* $NetBSD: net_inet6_nd_90.c,v 1.2 2023/12/09 20:31:57 oster Exp $*/ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: net_inet6_nd_90.c,v 1.1 2023/12/09 15:21:01 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: net_inet6_nd_90.c,v 1.2 2023/12/09 20:31:57 oster Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: net_inet6_nd #include +#ifdef INET6 + static struct sysctllog *nd6_clog; /* @@ -128,3 +130,6 @@ net_inet6_nd_90_fini(void) MODULE_HOOK_UNSET(net_inet6_nd_90_hook); return 0; } + +#endif /* INET6 */ +
Re: CVS commit: src/sys/dev/pci/igc
On 2023-10-15 17.06, Joerg Sonnenberger wrote: On Sun, Oct 15, 2023 at 10:36:53PM +, Greg Oster wrote: Module Name:src Committed By: oster Date: Sun Oct 15 22:36:53 UTC 2023 Modified Files: src/sys/dev/pci/igc: if_igc.c Log Message: Fix build of the MODULAR kernel, which explicitly excludes vlans. Please fix the macro to not expand to nothing instead. I think you're referring to the change I made to src/sys/dev/sequencer.c instead of this one... Done! Later... Greg Oster
CVS commit: src/sys/dev
Module Name:src Committed By: oster Date: Mon Oct 16 13:31:33 UTC 2023 Modified Files: src/sys/dev: sequencer.c Log Message: Redo previous by making the DPRINT macro always expand to something. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/dev/sequencer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: oster Date: Mon Oct 16 13:31:33 UTC 2023 Modified Files: src/sys/dev: sequencer.c Log Message: Redo previous by making the DPRINT macro always expand to something. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/dev/sequencer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sequencer.c diff -u src/sys/dev/sequencer.c:1.82 src/sys/dev/sequencer.c:1.83 --- src/sys/dev/sequencer.c:1.82 Sun Oct 15 18:13:37 2023 +++ src/sys/dev/sequencer.c Mon Oct 16 13:31:33 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.82 2023/10/15 18:13:37 oster Exp $ */ +/* $NetBSD: sequencer.c,v 1.83 2023/10/16 13:31:33 oster Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.82 2023/10/15 18:13:37 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.83 2023/10/16 13:31:33 oster Exp $"); #ifdef _KERNEL_OPT #include "midi.h" @@ -122,12 +122,12 @@ extern struct cfdriver sequencer_cd; ) #ifdef AUDIO_DEBUG -#define DPRINTF(x) if (sequencerdebug) printf x -#define DPRINTFN(n,x) if (sequencerdebug >= (n)) printf x +#define DPRINTF(x) do { if (sequencerdebug) printf x; } while (0) +#define DPRINTFN(n,x) do { if (sequencerdebug >= (n)) printf x; } while (0) int sequencerdebug = 0; #else -#define DPRINTF(x) -#define DPRINTFN(n,x) +#define DPRINTF(x) do { } while (0) +#define DPRINTFN(n,x) do { } while (0) #endif #define SEQ_NOTE_MAX 128 @@ -1224,9 +1224,8 @@ seq_timer_waitabs(struct sequencer_softc seq_timeout, sc); } #ifdef SEQUENCER_DEBUG - else if (tick < 0) { + else if (tick < 0) DPRINTF(("%s: ticks = %d\n", __func__, ticks)); - } #endif }
CVS commit: src/sys/dev/pci/igc
Module Name:src Committed By: oster Date: Sun Oct 15 22:36:53 UTC 2023 Modified Files: src/sys/dev/pci/igc: if_igc.c Log Message: Fix build of the MODULAR kernel, which explicitly excludes vlans. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/igc/if_igc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/igc/if_igc.c diff -u src/sys/dev/pci/igc/if_igc.c:1.6 src/sys/dev/pci/igc/if_igc.c:1.7 --- src/sys/dev/pci/igc/if_igc.c:1.6 Thu Oct 12 04:08:44 2023 +++ src/sys/dev/pci/igc/if_igc.c Sun Oct 15 22:36:52 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_igc.c,v 1.6 2023/10/12 04:08:44 rin Exp $ */ +/* $NetBSD: if_igc.c,v 1.7 2023/10/15 22:36:52 oster Exp $ */ /* $OpenBSD: if_igc.c,v 1.13 2023/04/28 10:18:57 bluhm Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.6 2023/10/12 04:08:44 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.7 2023/10/15 22:36:52 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -2095,7 +2095,9 @@ igc_rxeof(struct rx_ring *rxr, u_int lim const bool eop = staterr & IGC_RXD_STAT_EOP; const uint16_t len = le16toh(rxdesc->wb.upper.length); +#if NVLAN > 0 const uint16_t vtag = le16toh(rxdesc->wb.upper.vlan); +#endif const uint32_t ptype = le32toh(rxdesc->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK;
CVS commit: src/sys/dev/pci/igc
Module Name:src Committed By: oster Date: Sun Oct 15 22:36:53 UTC 2023 Modified Files: src/sys/dev/pci/igc: if_igc.c Log Message: Fix build of the MODULAR kernel, which explicitly excludes vlans. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/igc/if_igc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sun Oct 15 18:15:20 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_dagdegwr.c rf_dagffwr.c rf_pq.c rf_pqdeg.c rf_pqdegdags.c rf_pqdegdags.h Log Message: Make RF_INCLUDE_RAID6 build (needs more changes to make it work). Fix function signatures - recovFunc has a return type of void. Fix obvious errors/typos from previous "mechanical changes". MapSector no longer takes a row value. Cleanup (now unused) row usage. rf_bxor() doesn't take a bp argument. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/raidframe/rf_dagdegwr.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/raidframe/rf_dagffwr.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_pq.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/rf_pqdeg.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/rf_pqdegdags.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/raidframe/rf_pqdegdags.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_dagdegwr.c diff -u src/sys/dev/raidframe/rf_dagdegwr.c:1.36 src/sys/dev/raidframe/rf_dagdegwr.c:1.37 --- src/sys/dev/raidframe/rf_dagdegwr.c:1.36 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_dagdegwr.c Sun Oct 15 18:15:19 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagdegwr.c,v 1.36 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_dagdegwr.c,v 1.37 2023/10/15 18:15:19 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_dagdegwr.c,v 1.36 2021/07/23 00:54:45 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagdegwr.c,v 1.37 2023/10/15 18:15:19 oster Exp $"); #include @@ -382,8 +382,7 @@ rf_CommonCreateSimpleDegradedWriteDAG(RF /* fill in the Wnq Node */ if (nfaults == 2) { { - parityPA = RF_MallocAndAdd(sizeof(*parityPA), - allocList); + parityPDA = RF_MallocAndAdd(sizeof(*parityPDA), allocList); parityPDA->col = asmap->qInfo->col; parityPDA->startSector = ((asmap->qInfo->startSector / sectorsPerSU) * sectorsPerSU) + (failedPDA->startSector % sectorsPerSU); @@ -566,7 +565,7 @@ rf_CommonCreateSimpleDegradedWriteDAG(RF pda_p->numSector = num; \ pda_p->next = NULL; \ pda_p->bufPtr = BUF_ALLOC(num) -#if (RF_INCLUDE_PQ > 0) || (RF_INCLUDE_EVENODD > 0) +#if (RF_INCLUDE_RAID6 > 0) || (RF_INCLUDE_PQ > 0) || (RF_INCLUDE_EVENODD > 0) void rf_WriteGenerateFailedAccessASMs( RF_Raid_t * raidPtr, Index: src/sys/dev/raidframe/rf_dagffwr.c diff -u src/sys/dev/raidframe/rf_dagffwr.c:1.37 src/sys/dev/raidframe/rf_dagffwr.c:1.38 --- src/sys/dev/raidframe/rf_dagffwr.c:1.37 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_dagffwr.c Sun Oct 15 18:15:20 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagffwr.c,v 1.37 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_dagffwr.c,v 1.38 2023/10/15 18:15:20 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_dagffwr.c,v 1.37 2021/07/23 00:54:45 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagffwr.c,v 1.38 2023/10/15 18:15:20 oster Exp $"); #include @@ -229,7 +229,7 @@ rf_CommonCreateLargeWriteDAG(RF_Raid_t * #if (RF_INCLUDE_DECL_PQ > 0) || (RF_INCLUDE_RAID6 > 0) if (nfaults == 2) { - wnqNode = rf_AllocDAGNode(); + wnqNode = rf_AllocDAGNode(raidPtr); } else { wnqNode = NULL; } @@ -850,7 +850,7 @@ rf_CommonCreateSmallWriteDAG(RF_Raid_t * 7, 1, dag_h, qname, allocList); tmpqNode->params[0] = tmpreadDataNode->params[0]; tmpqNode->params[1] = tmpreadDataNode->params[1]; -tmpqNode->params[2] = tmpreadQNode->.params[0]; +tmpqNode->params[2] = tmpreadQNode->params[0]; tmpqNode->params[3] = tmpreadQNode->params[1]; tmpqNode->params[4] = tmpwriteDataNode->params[0]; tmpqNode->params[5] = tmpwriteDataNode->params[1]; @@ -858,7 +858,7 @@ rf_CommonCreateSmallWriteDAG(RF_Raid_t * /* use old Q buf as target buf */ tmpqNode->results[0] = tmpreadQNode->params[1].p; tmpqNode = tmpqNode->list_next; -tmpreadQNodes = tmpreadQNodes->list_next; +tmpreadQNode = tmpreadQNode->list_next; } #endif tmpxorNode = tmpxorNode->list_next; @@ -1078,7 +1078,7 @@ rf_CommonCreateSmallWriteDAG(RF_Raid_t * tmpqNode = qNodes; for (j = 0; j < numParityNodes; j++) { tmpreadQNode->succedents[j] = tmpqNode; -tmpqNode->antecedents[numDataNodes + i] = tmpreadQNodes; +tmpqNode->antecedents[numDataNodes + i] = tmpreadQNode; tmpqNode->antType[numDataNodes + i] = rf_trueData; tmpqNode = tmpqNode->list_next; } Index: src/sys/dev/raidframe/rf_pq.c diff -u src/sys/dev/raidframe/rf_pq.c:1.17 src/sys/dev/raidframe/rf_pq.c:1.18 --- src/sys/dev/raidframe/rf_pq.c:1.17 Thu Oct 10 03:43:59 2019 +++ src/sys/dev/raidframe/rf_pq.c Sun Oct 15 18:15:20 2023 @@ -1,4
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sun Oct 15 18:15:20 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_dagdegwr.c rf_dagffwr.c rf_pq.c rf_pqdeg.c rf_pqdegdags.c rf_pqdegdags.h Log Message: Make RF_INCLUDE_RAID6 build (needs more changes to make it work). Fix function signatures - recovFunc has a return type of void. Fix obvious errors/typos from previous "mechanical changes". MapSector no longer takes a row value. Cleanup (now unused) row usage. rf_bxor() doesn't take a bp argument. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/raidframe/rf_dagdegwr.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/raidframe/rf_dagffwr.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_pq.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/rf_pqdeg.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/rf_pqdegdags.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/raidframe/rf_pqdegdags.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: oster Date: Sun Oct 15 18:13:37 UTC 2023 Modified Files: src/sys/dev: sequencer.c Log Message: When building kernel=ALL, make gcc happy by addressing its warning of: "suggest braces around empty body in an 'if' statement". To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/dev/sequencer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sequencer.c diff -u src/sys/dev/sequencer.c:1.81 src/sys/dev/sequencer.c:1.82 --- src/sys/dev/sequencer.c:1.81 Fri Jul 1 01:04:59 2022 +++ src/sys/dev/sequencer.c Sun Oct 15 18:13:37 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.81 2022/07/01 01:04:59 riastradh Exp $ */ +/* $NetBSD: sequencer.c,v 1.82 2023/10/15 18:13:37 oster Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.81 2022/07/01 01:04:59 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.82 2023/10/15 18:13:37 oster Exp $"); #ifdef _KERNEL_OPT #include "midi.h" @@ -1224,8 +1224,9 @@ seq_timer_waitabs(struct sequencer_softc seq_timeout, sc); } #ifdef SEQUENCER_DEBUG - else if (tick < 0) + else if (tick < 0) { DPRINTF(("%s: ticks = %d\n", __func__, ticks)); + } #endif }
CVS commit: src/sys/dev
Module Name:src Committed By: oster Date: Sun Oct 15 18:13:37 UTC 2023 Modified Files: src/sys/dev: sequencer.c Log Message: When building kernel=ALL, make gcc happy by addressing its warning of: "suggest braces around empty body in an 'if' statement". To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/dev/sequencer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Oct 9 22:00:38 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_driver.c Log Message: Make the name of the condition more reflective of the name of the condition variable. From Edgar Fuß. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/dev/raidframe/rf_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Oct 9 22:00:38 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_driver.c Log Message: Make the name of the condition more reflective of the name of the condition variable. From Edgar Fuß. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/dev/raidframe/rf_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_driver.c diff -u src/sys/dev/raidframe/rf_driver.c:1.142 src/sys/dev/raidframe/rf_driver.c:1.143 --- src/sys/dev/raidframe/rf_driver.c:1.142 Mon Sep 25 21:59:38 2023 +++ src/sys/dev/raidframe/rf_driver.c Mon Oct 9 22:00:38 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.c,v 1.142 2023/09/25 21:59:38 oster Exp $ */ +/* $NetBSD: rf_driver.c,v 1.143 2023/10/09 22:00:38 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -66,7 +66,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.142 2023/09/25 21:59:38 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.143 2023/10/09 22:00:38 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_diagnostic.h" @@ -949,7 +949,7 @@ rf_alloc_mutex_cond(RF_Raid_t *raidPtr) rf_init_cond2(raidPtr->waitForReconCond, "rfrcnw"); - rf_init_cond2(raidPtr->changing_components_cv, "raidhs"); + rf_init_cond2(raidPtr->changing_components_cv, "rfcc"); } static void
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Oct 9 21:55:48 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: spaces->tabs. Noted by Edgar Fuß To generate a diff of this commit: cvs rdiff -u -r1.416 -r1.417 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.416 src/sys/dev/raidframe/rf_netbsdkintf.c:1.417 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.416 Thu Sep 28 15:50:23 2023 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Mon Oct 9 21:55:48 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.416 2023/09/28 15:50:23 manu Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.417 2023/10/09 21:55:48 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.416 2023/09/28 15:50:23 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.417 2023/10/09 21:55:48 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -3998,10 +3998,10 @@ rf_get_info(RF_Raid_t *raidPtr, RF_Devic } for (i = 0; i < config->nspares; i++) { config->spares[i] = raidPtr->Disks[raidPtr->numCol + i]; -if (config->spares[i].status == rf_ds_rebuilding_spare) { -/* raidctl(8) expects to see this as a used spare */ -config->spares[i].status = rf_ds_used_spare; -} + if (config->spares[i].status == rf_ds_rebuilding_spare) { + /* raidctl(8) expects to see this as a used spare */ + config->spares[i].status = rf_ds_used_spare; + } } return 0; }
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Oct 9 21:55:48 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: spaces->tabs. Noted by Edgar Fuß To generate a diff of this commit: cvs rdiff -u -r1.416 -r1.417 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: oster Date: Mon Sep 25 21:59:39 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: files.raidframe rf_decluster.c rf_driver.c rf_netbsdkintf.c rf_paritymap.c rf_raid.h src/sys/modules/raid: Makefile src/sys/rump/dev/lib/libraidframe: Makefile Removed Files: src/sys/dev/raidframe: rf_copyback.c rf_copyback.h Log Message: We no longer need the deprecated copyback functionality now that incorporating a used spare is automatic. Copyback has always been an issue, as to do a copyback all IO to the array had to be suspended, and so was very, very unlikely to have been used in anything resembling a production system. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sbin/raidctl/raidctl.8 \ src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/files.raidframe \ src/sys/dev/raidframe/rf_paritymap.c cvs rdiff -u -r1.55 -r0 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.6 -r0 src/sys/dev/raidframe/rf_copyback.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/raidframe/rf_decluster.c cvs rdiff -u -r1.141 -r1.142 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.414 -r1.415 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.6 -r1.7 src/sys/modules/raid/Makefile cvs rdiff -u -r1.13 -r1.14 src/sys/rump/dev/lib/libraidframe/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.8 diff -u src/sbin/raidctl/raidctl.8:1.81 src/sbin/raidctl/raidctl.8:1.82 --- src/sbin/raidctl/raidctl.8:1.81 Thu Sep 21 01:40:44 2023 +++ src/sbin/raidctl/raidctl.8 Mon Sep 25 21:59:38 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: raidctl.8,v 1.81 2023/09/21 01:40:44 oster Exp $ +.\" $NetBSD: raidctl.8,v 1.82 2023/09/25 21:59:38 oster Exp $ .\" .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ .\" any improvements or extensions that they make and grant Carnegie the .\" rights to redistribute these changes. .\" -.Dd September 20, 2023 +.Dd September 25, 2023 .Dt RAIDCTL 8 .Os .Sh NAME @@ -73,9 +73,6 @@ .Fl a Ar component Ar dev .Nm .Op Fl v -.Fl B Ar dev -.Nm -.Op Fl v .Fl C Ar config_file Ar dev .Nm .Op Fl v @@ -223,11 +220,6 @@ component within a particular RAID set) hot spare after it has been used and are not required for .Ar component before it is used. -.It Fl B Ar dev -Initiate a copyback of reconstructed data from a spare disk to -its original disk. -This is performed after a component has failed, -and the failed drive has been reconstructed onto a spare drive. .It Fl C Ar config_file Ar dev As for .Fl c , @@ -351,8 +343,7 @@ Remove the specified from the RAID. The component must be in the failed, spare, or spared state in order to be removed. .It Fl S Ar dev -Check the status of parity re-writing, component reconstruction, and -component copyback. +Check the status of parity re-writing and component reconstruction. The output indicates the amount of progress achieved in each of these areas. .It Fl s Ar dev @@ -374,9 +365,8 @@ Unconfigure the RAIDframe device. This does not remove any component labels or change any configuration settings (e.g. auto-configuration settings) for the RAID set. .It Fl v -Be more verbose. -For operations such as reconstructions, parity -re-writing, and copybacks, provide a progress indicator. +Be more verbose, and provide a progress indicator for operations such +as reconstructions and parity re-writing. .El .Pp The device used by @@ -965,7 +955,6 @@ Component label for /dev/sd3e: Parity status: clean Reconstruction is 100% complete. Parity Re-write is 100% complete. -Copyback is 100% complete. .Ed .Pp This indicates that all is well with the RAID set. @@ -1051,7 +1040,6 @@ Spares: Parity status: clean Reconstruction is 10% complete. Parity Re-write is 100% complete. -Copyback is 100% complete. .Ed .Pp This indicates that a reconstruction is in progress. @@ -1073,7 +1061,6 @@ No spares. Parity status: clean Reconstruction is 100% complete. Parity Re-write is 100% complete. -Copyback is 100% complete. .Ed .Pp as Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.81 src/sbin/raidctl/raidctl.c:1.82 --- src/sbin/raidctl/raidctl.c:1.81 Thu Sep 21 01:48:41 2023 +++ src/sbin/raidctl/raidctl.c Mon Sep 25 21:59:38 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.81 2023/09/21 01:48:41 oster Exp $ */ +/* $NetBSD: raidctl.c,v 1.82 2023/09/25 21:59:38 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.81 2023/09/21 01:48:41 oster Exp $"); +__RCSID("$NetBSD: raidctl.c,v 1.82 2023/09/25 21:59:38 oster Exp $"); #endif @@
CVS commit: src
Module Name:src Committed By: oster Date: Mon Sep 25 21:59:39 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: files.raidframe rf_decluster.c rf_driver.c rf_netbsdkintf.c rf_paritymap.c rf_raid.h src/sys/modules/raid: Makefile src/sys/rump/dev/lib/libraidframe: Makefile Removed Files: src/sys/dev/raidframe: rf_copyback.c rf_copyback.h Log Message: We no longer need the deprecated copyback functionality now that incorporating a used spare is automatic. Copyback has always been an issue, as to do a copyback all IO to the array had to be suspended, and so was very, very unlikely to have been used in anything resembling a production system. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sbin/raidctl/raidctl.8 \ src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/files.raidframe \ src/sys/dev/raidframe/rf_paritymap.c cvs rdiff -u -r1.55 -r0 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.6 -r0 src/sys/dev/raidframe/rf_copyback.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/raidframe/rf_decluster.c cvs rdiff -u -r1.141 -r1.142 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.414 -r1.415 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.6 -r1.7 src/sys/modules/raid/Makefile cvs rdiff -u -r1.13 -r1.14 src/sys/rump/dev/lib/libraidframe/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Sep 25 16:16:50 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_disks.c Log Message: snprintf() should really include a format. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/dev/raidframe/rf_disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_disks.c diff -u src/sys/dev/raidframe/rf_disks.c:1.94 src/sys/dev/raidframe/rf_disks.c:1.95 --- src/sys/dev/raidframe/rf_disks.c:1.94 Sun Sep 17 20:07:39 2023 +++ src/sys/dev/raidframe/rf_disks.c Mon Sep 25 16:16:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.94 2023/09/17 20:07:39 oster Exp $ */ +/* $NetBSD: rf_disks.c,v 1.95 2023/09/25 16:16:50 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -60,7 +60,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.94 2023/09/17 20:07:39 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.95 2023/09/25 16:16:50 oster Exp $"); #include @@ -1269,9 +1269,9 @@ rf_swap_components(RF_Raid_t *raidPtr, i RF_ASSERT(raidPtr->accesses_suspended == 0); /* Swap the component names... */ - snprintf(tmpdevname, sizeof(tmpdevname),raidPtr->Disks[a].devname); - snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), raidPtr->Disks[b].devname); - snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), tmpdevname); + snprintf(tmpdevname, sizeof(tmpdevname), "%s", raidPtr->Disks[a].devname); + snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), "%s", raidPtr->Disks[b].devname); + snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), "%s", tmpdevname); /* and the vp */ tmp_ci_vp = raidPtr->raid_cinfo[a].ci_vp;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Sep 25 16:16:50 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_disks.c Log Message: snprintf() should really include a format. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/dev/raidframe/rf_disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Thu Sep 21 01:48:41 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.c Log Message: Remove a couple of unneeded comments. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.80 src/sbin/raidctl/raidctl.c:1.81 --- src/sbin/raidctl/raidctl.c:1.80 Thu Sep 21 01:40:44 2023 +++ src/sbin/raidctl/raidctl.c Thu Sep 21 01:48:41 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.80 2023/09/21 01:40:44 oster Exp $ */ +/* $NetBSD: raidctl.c,v 1.81 2023/09/21 01:48:41 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.80 2023/09/21 01:40:44 oster Exp $"); +__RCSID("$NetBSD: raidctl.c,v 1.81 2023/09/21 01:48:41 oster Exp $"); #endif @@ -144,7 +144,6 @@ main(int argc,char *argv[]) if (argc > 5) { /* we have at least 5 args, so it might be a simplified config */ - /* XXX NEW CODE XXX */ strlcpy(name, argv[1], sizeof(name)); fd = opendisk(name, openmode, dev_name, sizeof(dev_name), 0); if (fd != -1) { @@ -159,7 +158,6 @@ main(int argc,char *argv[]) rf_simple_create(fd,argc-3,[3]); /* set serial number, set autoconfig, init parity */ -/* XXX need to grok a random number for the serial number here */ if (gettimeofday(,NULL) == -1) { serial_number = 12345777;
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Thu Sep 21 01:48:41 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.c Log Message: Remove a couple of unneeded comments. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Thu Sep 21 01:40:44 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c Log Message: Implement command-line configuration of simple RAID sets with raidctl based on the usage pattern: raidctl create... For example, raidctl raid0 create mirror absent /dev/wd1e will create a RAID level 1 (mirror) set with an absent first component and /dev/wd1e as the second component. The resulting RAID device will be marked as auto-configurable, will have a serial number set (based on the current time), and parity will be initialized. Reasonable performance values are automatically used by default for other parameters normally specified in the configuration file. Also: Only print out Autoconfig status if being verbose. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sbin/raidctl/raidctl.8 cvs rdiff -u -r1.79 -r1.80 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Thu Sep 21 01:40:44 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c Log Message: Implement command-line configuration of simple RAID sets with raidctl based on the usage pattern: raidctl create... For example, raidctl raid0 create mirror absent /dev/wd1e will create a RAID level 1 (mirror) set with an absent first component and /dev/wd1e as the second component. The resulting RAID device will be marked as auto-configurable, will have a serial number set (based on the current time), and parity will be initialized. Reasonable performance values are automatically used by default for other parameters normally specified in the configuration file. Also: Only print out Autoconfig status if being verbose. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sbin/raidctl/raidctl.8 cvs rdiff -u -r1.79 -r1.80 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.8 diff -u src/sbin/raidctl/raidctl.8:1.80 src/sbin/raidctl/raidctl.8:1.81 --- src/sbin/raidctl/raidctl.8:1.80 Sun Sep 17 20:07:39 2023 +++ src/sbin/raidctl/raidctl.8 Thu Sep 21 01:40:44 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: raidctl.8,v 1.80 2023/09/17 20:07:39 oster Exp $ +.\" $NetBSD: raidctl.8,v 1.81 2023/09/21 01:40:44 oster Exp $ .\" .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ .\" any improvements or extensions that they make and grant Carnegie the .\" rights to redistribute these changes. .\" -.Dd September 16, 2023 +.Dd September 20, 2023 .Dt RAIDCTL 8 .Os .Sh NAME @@ -61,6 +61,10 @@ .Nd configuration utility for the RAIDframe disk driver .Sh SYNOPSIS .Nm +.Ar dev +.Ar command +.Op Ar arg Op ... +.Nm .Op Fl v .Fl A Op yes | no | forceroot | softroot .Ar dev @@ -148,7 +152,27 @@ For more information about the RAIDframe This document assumes the reader has at least rudimentary knowledge of RAID and RAID concepts. .Pp -The command-line options for +The simplified command-line options for +.Nm +are as follows: +.Bl -tag -width indent +.It Ic create Ar level Ar component1 Ar component2 Ar ... +where +.Ar level +specifies the RAID level and is one of +.Ar 0 +, +.Ar 1 +(or +.Ar mirror +), or +.Ar 5 +and each of +.Ar componentN +specify the devices to be configured into the RAID set. +.El +.Pp +The advanced command-line options for .Nm are as follows: .Bl -tag -width indent @@ -370,6 +394,38 @@ for many others, or just simply .Pa /dev/rraid0[cd] ) . It is recommended that the partitions used to represent the RAID device are not used for file systems. +.Ss Simple RAID configuration +For simple RAID configurations using RAID levels 0 (simple striping), +1 (mirroring), or 5 (striping with distributed parity) +.Nm +supports command-line configuration of RAID setups without +the use of a configuration file. For example, +.Bd -literal -offset indent +raidctl raid0 create 0 /dev/wd0e /dev/wd1e /dev/wd2e +.Ed +.Pp +will create a RAID level 0 set on the device named +.Pa raid0 +using the components +.Pa /dev/wd0e , +.Pa /dev/wd1e , +and +.Pa /dev/wd2e . +Similarly, +.Bd -literal -offset indent +raidctl raid0 create mirror absent /dev/wd1e +.Ed +.Pp +will create a RAID level 1 (mirror) set with an absent first component +and +.Pa /dev/wd1e +as the second component. In all cases the resulting RAID device will +be marked as auto-configurable, will have a serial number set (based +on the current time), and parity will be initialized (if the RAID level +has parity and sufficent components are present). Reasonable +performance values are automatically used by default for other +parameters normally specified in the configuration file. +.Pp .Ss Configuration file The format of the configuration file is complex, and only an abbreviated treatment is given here. @@ -540,6 +596,10 @@ for a more complete configuration file e device special files. .El .Sh EXAMPLES +The examples given in this section are for more complex +setups than can be configured with the simplified command-line +configuration option described early. +.Pp It is highly recommended that before using the RAID driver for real file systems that the system administrator(s) become quite familiar with the use of Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.79 src/sbin/raidctl/raidctl.c:1.80 --- src/sbin/raidctl/raidctl.c:1.79 Sun Sep 17 20:07:39 2023 +++ src/sbin/raidctl/raidctl.c Thu Sep 21 01:40:44 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.79 2023/09/17 20:07:39 oster Exp $ */ +/* $NetBSD: raidctl.c,v 1.80 2023/09/21 01:40:44 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.79 2023/09/17 20:07:39 oster Exp $");
CVS commit: src
Module Name:src Committed By: oster Date: Sun Sep 17 20:07:39 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: raidframeio.h rf_diskqueue.c rf_diskqueue.h rf_disks.c rf_disks.h rf_driver.c rf_netbsdkintf.c rf_raid.h rf_reconstruct.c Log Message: Implement hot removal of spares and components. From manu@. Implement a long desired feature of automatically incorporating a used spare into the array after a reconstruct. Given the configuration: Components: /dev/wd0e: failed /dev/wd1e: optimal /dev/wd2e: optimal Spares: /dev/wd3e: spare Running 'raidctl -F /dev/wd0e raid0' will now result in the following configuration after a successful rebuild: Components: /dev/wd3e: optimal /dev/wd1e: optimal /dev/wd2e: optimal No spares. Thanks to manu@ for the development of the initial set of changes which allowed the changes to automatically incorporate a used spare to come to fruition. Thanks also to manu@ for useful discussions about and additional testing of these changes. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sbin/raidctl/raidctl.8 cvs rdiff -u -r1.78 -r1.79 src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/raidframe/raidframeio.h cvs rdiff -u -r1.63 -r1.64 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/raidframe/rf_diskqueue.h cvs rdiff -u -r1.93 -r1.94 src/sys/dev/raidframe/rf_disks.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/raidframe/rf_disks.h cvs rdiff -u -r1.140 -r1.141 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.413 -r1.414 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.128 -r1.129 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.8 diff -u src/sbin/raidctl/raidctl.8:1.79 src/sbin/raidctl/raidctl.8:1.80 --- src/sbin/raidctl/raidctl.8:1.79 Tue Jun 14 08:06:18 2022 +++ src/sbin/raidctl/raidctl.8 Sun Sep 17 20:07:39 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: raidctl.8,v 1.79 2022/06/14 08:06:18 kre Exp $ +.\" $NetBSD: raidctl.8,v 1.80 2023/09/17 20:07:39 oster Exp $ .\" .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ .\" any improvements or extensions that they make and grant Carnegie the .\" rights to redistribute these changes. .\" -.Dd June 13, 2022 +.Dd September 16, 2023 .Dt RAIDCTL 8 .Os .Sh NAME @@ -322,9 +322,10 @@ if necessary, and immediately begins a r This is useful for reconstructing back onto a component after it has been replaced following a failure. .It Fl r Ar component Ar dev -Remove the spare disk specified by +Remove the specified .Ar component -from the set of available spare components. +from the RAID. The component must be in the failed, spare, or spared state +in order to be removed. .It Fl S Ar dev Check the status of parity re-writing, component reconstruction, and component copyback. @@ -1005,10 +1006,9 @@ option will show: .Bd -literal -offset indent Components: /dev/sd1e: optimal - /dev/sd2e: spared + /dev/sd4e: optimal /dev/sd3e: optimal -Spares: - /dev/sd4e: used_spare +No spares. [...] Parity status: clean Reconstruction is 100% complete. @@ -1016,62 +1016,10 @@ Parity Re-write is 100% complete. Copyback is 100% complete. .Ed .Pp -At this point there are at least two options. -First, if -.Pa /dev/sd2e -is known to be good (i.e., the failure was either caused by -.Fl f -or -.Fl F , -or the failed disk was replaced), then a copyback of the data can -be initiated with the -.Fl B -option. -In this example, this would copy the entire contents of -.Pa /dev/sd4e -to -.Pa /dev/sd2e . -Once the copyback procedure is complete, the -status of the device would be (in part): -.Bd -literal -offset indent -Components: - /dev/sd1e: optimal - /dev/sd2e: optimal - /dev/sd3e: optimal -Spares: - /dev/sd4e: spare -.Ed -.Pp -and the system is back to normal operation. -.Pp -The second option after the reconstruction is to simply use -.Pa /dev/sd4e -in place of -.Pa /dev/sd2e -in the configuration file. -For example, the configuration file (in part) might now look like: -.Bd -literal -offset indent -START array -3 0 - -START disks -/dev/sd1e -/dev/sd4e -/dev/sd3e -.Ed -.Pp -This can be done as -.Pa /dev/sd4e -is completely interchangeable with +as .Pa /dev/sd2e -at this point. -Note that extreme care must be taken when -changing the order of the drives in a configuration. -This is one of the few instances where the devices and/or -their orderings can be changed without loss of data! -In general, the ordering of components in a configuration file should -.Em never -be
CVS commit: src
Module Name:src Committed By: oster Date: Sun Sep 17 20:07:39 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: raidframeio.h rf_diskqueue.c rf_diskqueue.h rf_disks.c rf_disks.h rf_driver.c rf_netbsdkintf.c rf_raid.h rf_reconstruct.c Log Message: Implement hot removal of spares and components. From manu@. Implement a long desired feature of automatically incorporating a used spare into the array after a reconstruct. Given the configuration: Components: /dev/wd0e: failed /dev/wd1e: optimal /dev/wd2e: optimal Spares: /dev/wd3e: spare Running 'raidctl -F /dev/wd0e raid0' will now result in the following configuration after a successful rebuild: Components: /dev/wd3e: optimal /dev/wd1e: optimal /dev/wd2e: optimal No spares. Thanks to manu@ for the development of the initial set of changes which allowed the changes to automatically incorporate a used spare to come to fruition. Thanks also to manu@ for useful discussions about and additional testing of these changes. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sbin/raidctl/raidctl.8 cvs rdiff -u -r1.78 -r1.79 src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/raidframe/raidframeio.h cvs rdiff -u -r1.63 -r1.64 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/raidframe/rf_diskqueue.h cvs rdiff -u -r1.93 -r1.94 src/sys/dev/raidframe/rf_disks.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/raidframe/rf_disks.h cvs rdiff -u -r1.140 -r1.141 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.413 -r1.414 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.128 -r1.129 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sat Sep 16 23:38:57 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: A component that is in state rf_ds_reconstructing has failed, and should not be consulted for DIOCGCACHE. Fixes an observed panic when rf_get_component_caches() does an IOCTL to a failed device while reconstruction is in progress. XXX pullup netbsd-10 XXX pullup netbsd-9 To generate a diff of this commit: cvs rdiff -u -r1.412 -r1.413 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.412 src/sys/dev/raidframe/rf_netbsdkintf.c:1.413 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.412 Thu Jun 15 09:15:54 2023 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Sat Sep 16 23:38:57 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.412 2023/06/15 09:15:54 hannken Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.413 2023/09/16 23:38:57 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.412 2023/06/15 09:15:54 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.413 2023/09/16 23:38:57 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -3771,8 +3771,7 @@ rf_get_component_caches(RF_Raid_t *raidP * Check any non-dead disk, even when currently being * reconstructed. */ - if (!RF_DEAD_DISK(raidPtr->Disks[c].status) - || raidPtr->Disks[c].status == rf_ds_reconstructing) { + if (!RF_DEAD_DISK(raidPtr->Disks[c].status)) { error = VOP_IOCTL(raidPtr->raid_cinfo[c].ci_vp, DIOCGCACHE, , FREAD, NOCRED); if (error) {
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sat Sep 16 23:38:57 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: A component that is in state rf_ds_reconstructing has failed, and should not be consulted for DIOCGCACHE. Fixes an observed panic when rf_get_component_caches() does an IOCTL to a failed device while reconstruction is in progress. XXX pullup netbsd-10 XXX pullup netbsd-9 To generate a diff of this commit: cvs rdiff -u -r1.412 -r1.413 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/vax/include
Module Name:src Committed By: oster Date: Sun Sep 10 00:15:52 UTC 2023 Modified Files: src/sys/arch/vax/include: cpu.h Log Message: With the overhaul of the scheduler code the semantics of ci_want_resched have changed, and for some reason vax still requires ci_want_resched set to 1 in order to do preemption. This commit contains a workaround for the preemption issued discussed in PR#55415. XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/vax/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/vax/include
Module Name:src Committed By: oster Date: Sun Sep 10 00:15:52 UTC 2023 Modified Files: src/sys/arch/vax/include: cpu.h Log Message: With the overhaul of the scheduler code the semantics of ci_want_resched have changed, and for some reason vax still requires ci_want_resched set to 1 in order to do preemption. This commit contains a workaround for the preemption issued discussed in PR#55415. XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/vax/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/vax/include/cpu.h diff -u src/sys/arch/vax/include/cpu.h:1.106 src/sys/arch/vax/include/cpu.h:1.107 --- src/sys/arch/vax/include/cpu.h:1.106 Sun Dec 11 18:02:40 2022 +++ src/sys/arch/vax/include/cpu.h Sun Sep 10 00:15:52 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.106 2022/12/11 18:02:40 oster Exp $ */ +/* $NetBSD: cpu.h,v 1.107 2023/09/10 00:15:52 oster Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden @@ -156,10 +156,15 @@ extern int cpu_printfataltraps; #define curcpu() (curlwp->l_cpu + 0) #define curlwp ((struct lwp *)mfpr(PR_SSP)) #define cpu_number() (curcpu()->ci_cpuid) +/* XXX RESCHED_REMOTE isn't the right flag name to be used here, +but we need to set ci_want_resched to '1' to make things work +on vax. See PR#55415 */ #define cpu_need_resched(ci, l, flags) \ do { \ struct pcb *pcb = lwp_getpcb(curlwp); \ __USE(flags); \ + /* XXX RESCHED_REMOTE isn't the right flag */ \ + (ci)->ci_want_resched = RESCHED_REMOTE; \ pcb->P0LR = (pcb->P0LR & ~AST_MASK) | AST_ON; \ mtpr(AST_OK,PR_ASTLVL);\ } while (/*CONSTCOND*/ 0)
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Sep 8 22:55:32 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_reconstruct.c Log Message: Revision 1.104 actually fixed the issues that were preventing us from freeing the ReconControl structures. So free them and thus also prevent a panic on shutdown due to items not being correctly returned to the pool. Thanks to manu@ for report of the panic, and for initial testing of the changes. XXX pullup-9 XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_reconstruct.c diff -u src/sys/dev/raidframe/rf_reconstruct.c:1.127 src/sys/dev/raidframe/rf_reconstruct.c:1.128 --- src/sys/dev/raidframe/rf_reconstruct.c:1.127 Tue Jul 27 03:01:48 2021 +++ src/sys/dev/raidframe/rf_reconstruct.c Fri Sep 8 22:55:32 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.127 2021/07/27 03:01:48 oster Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.128 2023/09/08 22:55:32 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ / #include -__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.127 2021/07/27 03:01:48 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.128 2023/09/08 22:55:32 oster Exp $"); #include #include @@ -897,24 +897,11 @@ rf_ContinueReconstructFailedDisk(RF_Raid rf_DrainReconEventQueue(reconDesc); - /* XXX As much as we'd like to free the recon control structure - and the reconDesc, we have no way of knowing if/when those will - be touched by IO that has yet to occur. It is rather poor to be - basically causing a 'memory leak' here, but there doesn't seem to be - a cleaner alternative at this time. Perhaps when the reconstruct code - gets a makeover this problem will go away. - */ -#if 0 rf_FreeReconControl(raidPtr); -#endif - #if RF_ACC_TRACE > 0 RF_Free(raidPtr->recon_tracerecs, raidPtr->numCol * sizeof(RF_AccTraceEntry_t)); #endif - /* XXX see comment above */ -#if 0 FreeReconDesc(reconDesc); -#endif return (1); }
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Sep 8 22:55:32 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_reconstruct.c Log Message: Revision 1.104 actually fixed the issues that were preventing us from freeing the ReconControl structures. So free them and thus also prevent a panic on shutdown due to items not being correctly returned to the pool. Thanks to manu@ for report of the panic, and for initial testing of the changes. XXX pullup-9 XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/wgconfig
Module Name:src Committed By: oster Date: Sun May 7 16:05:07 UTC 2023 Modified Files: src/usr.sbin/wgconfig: wgconfig.c Log Message: Don't allow "wgconfig add peer ..." to accept invalid options. Addresses PR bin/57392 . To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/wgconfig/wgconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/wgconfig
Module Name:src Committed By: oster Date: Sun May 7 16:05:07 UTC 2023 Modified Files: src/usr.sbin/wgconfig: wgconfig.c Log Message: Don't allow "wgconfig add peer ..." to accept invalid options. Addresses PR bin/57392 . To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/wgconfig/wgconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/wgconfig/wgconfig.c diff -u src/usr.sbin/wgconfig/wgconfig.c:1.5 src/usr.sbin/wgconfig/wgconfig.c:1.6 --- src/usr.sbin/wgconfig/wgconfig.c:1.5 Fri Aug 28 17:17:53 2020 +++ src/usr.sbin/wgconfig/wgconfig.c Sun May 7 16:05:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: wgconfig.c,v 1.5 2020/08/28 17:17:53 tih Exp $ */ +/* $NetBSD: wgconfig.c,v 1.6 2023/05/07 16:05:07 oster Exp $ */ /* * Copyright (C) Ryota Ozaki @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: wgconfig.c,v 1.5 2020/08/28 17:17:53 tih Exp $"); +__RCSID("$NetBSD: wgconfig.c,v 1.6 2023/05/07 16:05:07 oster Exp $"); #include @@ -680,14 +680,18 @@ handle_options(int argc, char *argv[], p { while (argc > 0) { + int found = 0; for (size_t i = 0; i < __arraycount(options); i++) { const struct option *opt = [i]; size_t optlen = strlen(opt->option); if (strncmp(argv[0], opt->option, optlen) == 0) { opt->func(argv[0] + optlen, prop_dict); +found = 1; break; } } + if (found == 0) + errx(EXIT_FAILURE, "invalid option: %s", argv[0]); argc -= 1; argv += 1; }
CVS commit: src/sys/arch/vax
Module Name:src Committed By: oster Date: Sun Dec 11 18:02:40 UTC 2022 Modified Files: src/sys/arch/vax/include: cpu.h pcb.h src/sys/arch/vax/vax: pmap.c trap.c Log Message: Support save/restore of AST levels in the PCB for context switching. Code written by ragge@ , tested by oster@. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/vax/include/cpu.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/vax/include/pcb.h cvs rdiff -u -r1.194 -r1.195 src/sys/arch/vax/vax/pmap.c cvs rdiff -u -r1.136 -r1.137 src/sys/arch/vax/vax/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/vax/include/cpu.h diff -u src/sys/arch/vax/include/cpu.h:1.105 src/sys/arch/vax/include/cpu.h:1.106 --- src/sys/arch/vax/include/cpu.h:1.105 Sat Aug 14 17:51:19 2021 +++ src/sys/arch/vax/include/cpu.h Sun Dec 11 18:02:40 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.105 2021/08/14 17:51:19 ryo Exp $ */ +/* $NetBSD: cpu.h,v 1.106 2022/12/11 18:02:40 oster Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden @@ -157,9 +157,11 @@ extern int cpu_printfataltraps; #define curlwp ((struct lwp *)mfpr(PR_SSP)) #define cpu_number() (curcpu()->ci_cpuid) #define cpu_need_resched(ci, l, flags) \ - do { \ - __USE(flags); \ - mtpr(AST_OK,PR_ASTLVL); \ + do { \ + struct pcb *pcb = lwp_getpcb(curlwp); \ + __USE(flags); \ + pcb->P0LR = (pcb->P0LR & ~AST_MASK) | AST_ON; \ + mtpr(AST_OK,PR_ASTLVL);\ } while (/*CONSTCOND*/ 0) #define cpu_proc_fork(x, y) do { } while (/*CONSCOND*/0) @@ -198,7 +200,12 @@ extern char vax_mp_tramp; * process as soon as possible. */ -#define cpu_signotify(l) mtpr(AST_OK,PR_ASTLVL) +#define cpu_signotify(l) \ + do { \ + struct pcb *pcb = lwp_getpcb(l); \ + pcb->P0LR = (pcb->P0LR & ~AST_MASK) | AST_ON; \ + mtpr(AST_OK,PR_ASTLVL);\ + } while (/*CONSTCOND*/ 0) /* @@ -206,7 +213,13 @@ extern char vax_mp_tramp; * buffer pages are invalid. On the hp300, request an ast to send us * through trap, marking the proc as needing a profiling tick. */ -#define cpu_need_proftick(l) do { (l)->l_pflag |= LP_OWEUPC; mtpr(AST_OK,PR_ASTLVL); } while (/*CONSTCOND*/ 0) +#define cpu_need_proftick(l) \ + do { \ + struct pcb *pcb = lwp_getpcb(l); \ + (l)->l_pflag |= LP_OWEUPC; \ + pcb->P0LR = (pcb->P0LR & ~AST_MASK) | AST_ON; \ + mtpr(AST_OK,PR_ASTLVL);\ + } while (/*CONSTCOND*/ 0) /* * This defines the I/O device register space size in pages. Index: src/sys/arch/vax/include/pcb.h diff -u src/sys/arch/vax/include/pcb.h:1.15 src/sys/arch/vax/include/pcb.h:1.16 --- src/sys/arch/vax/include/pcb.h:1.15 Mon May 22 17:12:11 2017 +++ src/sys/arch/vax/include/pcb.h Sun Dec 11 18:02:40 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pcb.h,v 1.15 2017/05/22 17:12:11 ragge Exp $ */ +/* $NetBSD: pcb.h,v 1.16 2022/12/11 18:02:40 oster Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -49,6 +49,7 @@ struct pcb { long P0LR; /* Page 0 Length Register*/ struct pte *P1BR; /* Page 1 Base Register */ long P1LR; /* Page 1 Length Register*/ + long ASN; /* Address space number */ /* Software registers, only used by kernel software */ void *pcb_onfault; /* Tells whether fault copy */ @@ -58,7 +59,8 @@ struct pcb { }; #define AST_MASK 0x0700 -#define AST_PCB 0x0400 +#define AST_PCB 0x0400 /* disable AST */ +#define AST_ON 0x0300 /* request AST */ /* machine-specific core dump; save trapframe */ struct md_coredump { Index: src/sys/arch/vax/vax/pmap.c diff -u src/sys/arch/vax/vax/pmap.c:1.194 src/sys/arch/vax/vax/pmap.c:1.195 --- src/sys/arch/vax/vax/pmap.c:1.194 Fri Feb 11 17:26:55 2022 +++ src/sys/arch/vax/vax/pmap.c Sun Dec 11 18:02:40 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.194 2022/02/11 17:26:55 riastradh Exp $ */ +/* $NetBSD: pmap.c,v 1.195 2022/12/11 18:02:40 oster Exp $ */ /* * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.194 2022/02/11 17:26:55 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.195 2022/12/11 18:02:40 oster Exp $"); #include "opt_ddb.h" #include "opt_cputype.h" @@ -552,7 +552,7 @@ update_pcbs(struct pmap *pm) for (pcb = pm->pm_pcbs; pcb != NULL; pcb = pcb->pcb_pmnext) { KASSERT(pcb->pcb_pm == pm); pcb->P0BR = pm->pm_p0br; - pcb->P0LR = pm->pm_p0lr|AST_PCB; + pcb->P0LR = pm->pm_p0lr | (pcb->P0LR & AST_MASK); pcb->P1BR = pm->pm_p1br; pcb->P1LR = pm->pm_p1lr; @@ -561,7 +561,7 @@ update_pcbs(struct pmap *pm) /* If curlwp uses this pmap update the regs too */ if (pm == curproc->p_vmspace->vm_map.pmap) { mtpr((uintptr_t)pm->pm_p0br, PR_P0BR); - mtpr(pm->pm_p0lr|AST_PCB, PR_P0LR); + mtpr(pm->pm_p0lr,
CVS commit: src/sys/arch/vax
Module Name:src Committed By: oster Date: Sun Dec 11 18:02:40 UTC 2022 Modified Files: src/sys/arch/vax/include: cpu.h pcb.h src/sys/arch/vax/vax: pmap.c trap.c Log Message: Support save/restore of AST levels in the PCB for context switching. Code written by ragge@ , tested by oster@. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/vax/include/cpu.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/vax/include/pcb.h cvs rdiff -u -r1.194 -r1.195 src/sys/arch/vax/vax/pmap.c cvs rdiff -u -r1.136 -r1.137 src/sys/arch/vax/vax/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sun Aug 28 00:37:41 UTC 2022 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Simplify the check for what ioctls can be done in raidioctl() without the device being initialized. To generate a diff of this commit: cvs rdiff -u -r1.409 -r1.410 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.409 src/sys/dev/raidframe/rf_netbsdkintf.c:1.410 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.409 Sun Aug 28 00:26:04 2022 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Sun Aug 28 00:37:41 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.409 2022/08/28 00:26:04 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.410 2022/08/28 00:37:41 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.409 2022/08/28 00:26:04 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.410 2022/08/28 00:37:41 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -1095,46 +1095,6 @@ raid_detach_unlocked(struct raid_softc * return 0; } -static bool -rf_must_be_initialized(const struct raid_softc *rs, u_long cmd) -{ - switch (cmd) { - case RAIDFRAME_ADD_HOT_SPARE: - case RAIDFRAME_CHECK_COPYBACK_STATUS: - case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT: - case RAIDFRAME_CHECK_PARITY: - case RAIDFRAME_CHECK_PARITYREWRITE_STATUS: - case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT: - case RAIDFRAME_CHECK_RECON_STATUS: - case RAIDFRAME_CHECK_RECON_STATUS_EXT: - case RAIDFRAME_COPYBACK: - case RAIDFRAME_DELETE_COMPONENT: - case RAIDFRAME_FAIL_DISK: - case RAIDFRAME_GET_ACCTOTALS: - case RAIDFRAME_GET_COMPONENT_LABEL: - case RAIDFRAME_GET_INFO: - case RAIDFRAME_GET_SIZE: - case RAIDFRAME_INCORPORATE_HOT_SPARE: - case RAIDFRAME_INIT_LABELS: - case RAIDFRAME_KEEP_ACCTOTALS: - case RAIDFRAME_PARITYMAP_GET_DISABLE: - case RAIDFRAME_PARITYMAP_SET_DISABLE: - case RAIDFRAME_PARITYMAP_SET_PARAMS: - case RAIDFRAME_PARITYMAP_STATUS: - case RAIDFRAME_REBUILD_IN_PLACE: - case RAIDFRAME_REMOVE_HOT_SPARE: - case RAIDFRAME_RESET_ACCTOTALS: - case RAIDFRAME_REWRITEPARITY: - case RAIDFRAME_SET_AUTOCONFIG: - case RAIDFRAME_SET_COMPONENT_LABEL: - case RAIDFRAME_SET_LAST_UNIT: - case RAIDFRAME_SET_ROOT: - case RAIDFRAME_SHUTDOWN: - return (rs->sc_flags & RAIDF_INITED) == 0; - } - return false; -} - int rf_fail_disk(RF_Raid_t *raidPtr, struct rf_recon_req *rr) { @@ -1514,9 +1474,15 @@ raidioctl(dev_t dev, u_long cmd, void *d db1_printf(("raidioctl: %d %d %d %lu\n", (int) dev, (int) DISKPART(dev), (int) unit, cmd)); - /* Must be initialized for these... */ - if (rf_must_be_initialized(rs, cmd)) - return ENXIO; + /* Only CONFIGURE and RESCAN can be done without the RAID being initialized. */ + switch (cmd) { + case RAIDFRAME_CONFIGURE: + case RAIDFRAME_RESCAN: + break; + default: + if (!rf_inited(rs)) + return ENXIO; + } switch (cmd) { /* configure the system */
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sun Aug 28 00:37:41 UTC 2022 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Simplify the check for what ioctls can be done in raidioctl() without the device being initialized. To generate a diff of this commit: cvs rdiff -u -r1.409 -r1.410 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sun Aug 28 00:26:04 UTC 2022 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: RAIDframe must be initialized for the RAIDFRAME_SET_LAST_UNIT and RAIDFRAME_SHUTDOWN ioctls. XXX Pullup-9 Reported-by: syzbot+1c20fcbe34d72cd7f...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.408 -r1.409 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.408 src/sys/dev/raidframe/rf_netbsdkintf.c:1.409 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.408 Wed Aug 10 01:16:38 2022 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Sun Aug 28 00:26:04 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.408 2022/08/10 01:16:38 mrg Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.409 2022/08/28 00:26:04 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.408 2022/08/10 01:16:38 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.409 2022/08/28 00:26:04 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -1127,7 +1127,9 @@ rf_must_be_initialized(const struct raid case RAIDFRAME_REWRITEPARITY: case RAIDFRAME_SET_AUTOCONFIG: case RAIDFRAME_SET_COMPONENT_LABEL: + case RAIDFRAME_SET_LAST_UNIT: case RAIDFRAME_SET_ROOT: + case RAIDFRAME_SHUTDOWN: return (rs->sc_flags & RAIDF_INITED) == 0; } return false;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sun Aug 28 00:26:04 UTC 2022 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: RAIDframe must be initialized for the RAIDFRAME_SET_LAST_UNIT and RAIDFRAME_SHUTDOWN ioctls. XXX Pullup-9 Reported-by: syzbot+1c20fcbe34d72cd7f...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.408 -r1.409 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jun 28 03:13:27 UTC 2022 Modified Files: src/sys/dev/raidframe: rf_compat80.c Log Message: RAIDframe must be initialized for the RAIDFRAME_FAIL_DISK80 ioctl. Reported-by: syzbot+048387fcc9a1a3682...@syzkaller.appspotmail.com Reported-by: syzbot+037d1813186571cb2...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/rf_compat80.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_compat80.c diff -u src/sys/dev/raidframe/rf_compat80.c:1.16 src/sys/dev/raidframe/rf_compat80.c:1.17 --- src/sys/dev/raidframe/rf_compat80.c:1.16 Sat Dec 11 19:24:21 2021 +++ src/sys/dev/raidframe/rf_compat80.c Tue Jun 28 03:13:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat80.c,v 1.16 2021/12/11 19:24:21 mrg Exp $ */ +/* $NetBSD: rf_compat80.c,v 1.17 2022/06/28 03:13:27 oster Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -315,11 +315,11 @@ raidframe_ioctl_80(struct raid_softc *rs case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT80: case RAIDFRAME_GET_INFO80: case RAIDFRAME_GET_COMPONENT_LABEL80: + case RAIDFRAME_FAIL_DISK80: if (!rf_inited(rs)) return ENXIO; break; case RAIDFRAME_CONFIGURE80: - case RAIDFRAME_FAIL_DISK80: break; default: return EPASSTHROUGH;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jun 28 03:13:27 UTC 2022 Modified Files: src/sys/dev/raidframe: rf_compat80.c Log Message: RAIDframe must be initialized for the RAIDFRAME_FAIL_DISK80 ioctl. Reported-by: syzbot+048387fcc9a1a3682...@syzkaller.appspotmail.com Reported-by: syzbot+037d1813186571cb2...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/rf_compat80.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sat Aug 28 16:00:52 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: If there is a FS_RAID partition on a disk, then we shouldn't look at the raw partition. In particular, we now need to account for the case where an existing FS_RAID partition is now open because it is in use. If that is the case, we don't look at the raw partition. Addresses PR kern/56369. To generate a diff of this commit: cvs rdiff -u -r1.399 -r1.400 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.399 src/sys/dev/raidframe/rf_netbsdkintf.c:1.400 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.399 Sat Aug 7 16:19:15 2021 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Sat Aug 28 16:00:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.399 2021/08/07 16:19:15 thorpej Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.400 2021/08/28 16:00:52 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.399 2021/08/07 16:19:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.400 2021/08/28 16:00:52 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -3040,7 +3040,19 @@ rf_find_raid_components(void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_OPEN(vp, FREAD, NOCRED); if (error) { - /* Whatever... */ + /* Not quite a 'whatever'. In + * this situation we know + * there is a FS_RAID + * partition, but we can't + * open it. The most likely + * reason is that the + * partition is already in + * use by another RAID set. + * So note that we've already + * found a partition on this + * disk so we don't attempt + * to use the raw disk later. */ + rf_part_found = 1; vput(vp); continue; }
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sat Aug 28 16:00:52 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: If there is a FS_RAID partition on a disk, then we shouldn't look at the raw partition. In particular, we now need to account for the case where an existing FS_RAID partition is now open because it is in use. If that is the case, we don't look at the raw partition. Addresses PR kern/56369. To generate a diff of this commit: cvs rdiff -u -r1.399 -r1.400 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Aug 2 22:37:29 UTC 2021 Modified Files: src/sys/dev/raidframe: raidframevar.h rf_raid.h Log Message: Accidentally commited some other changes that weren't quite ready. Add these changes to fix the build. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/raidframevar.h cvs rdiff -u -r1.49 -r1.50 src/sys/dev/raidframe/rf_raid.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/raidframevar.h diff -u src/sys/dev/raidframe/raidframevar.h:1.21 src/sys/dev/raidframe/raidframevar.h:1.22 --- src/sys/dev/raidframe/raidframevar.h:1.21 Thu Oct 10 03:43:59 2019 +++ src/sys/dev/raidframe/raidframevar.h Mon Aug 2 22:37:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: raidframevar.h,v 1.21 2019/10/10 03:43:59 christos Exp $ */ +/* $NetBSD: raidframevar.h,v 1.22 2021/08/02 22:37:29 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -355,6 +355,7 @@ typedef RF_uint32 RF_ReconReqFlags_t; /* flags that can be put in the rf_recon_req structure */ #define RF_FDFLAGS_NONE 0x0 /* just fail the disk */ #define RF_FDFLAGS_RECON 0x1 /* fail and initiate recon */ +#define RF_FDFLAGS_RECON_FORCE 0x2 /* fail and initiate recon, ignoring errors */ struct rf_recon_req { /* used to tell the kernel to fail a disk */ RF_RowCol_t col; Index: src/sys/dev/raidframe/rf_raid.h diff -u src/sys/dev/raidframe/rf_raid.h:1.49 src/sys/dev/raidframe/rf_raid.h:1.50 --- src/sys/dev/raidframe/rf_raid.h:1.49 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_raid.h Mon Aug 2 22:37:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid.h,v 1.49 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_raid.h,v 1.50 2021/08/02 22:37:29 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -187,6 +187,7 @@ struct RF_Raid_s { RF_HeadSepLimit_t headSepLimit; int numFloatingReconBufs; int reconInProgress; + int forceRecon; rf_declare_cond2(waitForReconCond); /* goes with raidPtr->mutex */ RF_RaidReconDesc_t *reconDesc; /* reconstruction descriptor */ RF_ReconCtrl_t *reconControl; /* reconstruction control structure
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Aug 2 22:37:29 UTC 2021 Modified Files: src/sys/dev/raidframe: raidframevar.h rf_raid.h Log Message: Accidentally commited some other changes that weren't quite ready. Add these changes to fix the build. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/raidframevar.h cvs rdiff -u -r1.49 -r1.50 src/sys/dev/raidframe/rf_raid.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: oster Date: Mon Aug 2 20:31:15 UTC 2021 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: raidframeio.h rf_netbsdkintf.c Log Message: Support on-demand re-scanning all devices to look for autoconfig RAID sets. raidctl now supports looking for autoconfig RAID sets with a new '-L' flag. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sbin/raidctl/raidctl.8 cvs rdiff -u -r1.73 -r1.74 src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/raidframeio.h cvs rdiff -u -r1.397 -r1.398 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: oster Date: Mon Aug 2 20:31:15 UTC 2021 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: raidframeio.h rf_netbsdkintf.c Log Message: Support on-demand re-scanning all devices to look for autoconfig RAID sets. raidctl now supports looking for autoconfig RAID sets with a new '-L' flag. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sbin/raidctl/raidctl.8 cvs rdiff -u -r1.73 -r1.74 src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/raidframeio.h cvs rdiff -u -r1.397 -r1.398 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.8 diff -u src/sbin/raidctl/raidctl.8:1.77 src/sbin/raidctl/raidctl.8:1.78 --- src/sbin/raidctl/raidctl.8:1.77 Thu May 27 07:03:27 2021 +++ src/sbin/raidctl/raidctl.8 Mon Aug 2 20:31:15 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: raidctl.8,v 1.77 2021/05/27 07:03:27 wiz Exp $ +.\" $NetBSD: raidctl.8,v 1.78 2021/08/02 20:31:15 oster Exp $ .\" .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ .\" any improvements or extensions that they make and grant Carnegie the .\" rights to redistribute these changes. .\" -.Dd May 26, 2021 +.Dd August 2, 2021 .Dt RAIDCTL 8 .Os .Sh NAME @@ -96,6 +96,9 @@ .Fl i Ar dev .Nm .Op Fl v +.Fl L Ar dev +.Nm +.Op Fl v .Fl M .Oo yes | no | set .Ar params @@ -251,6 +254,15 @@ be done for .Em all RAID sets before the RAID device is labeled and before file systems are created on the RAID device. +.It Fl L Ar dev +Rescan all devices on the system, looking for RAID sets that can be +auto-configured. The RAID device provided here has to be a valid +device, but does not need to be configured. (e.g. +.Bd -literal -offset indent +raidctl -L raid0 +.Ed +.Pp +is all that is needed to perform a rescan.) .It Fl M Ic yes Ar dev .\"XXX should there be a section with more info on the parity map feature? Enable the use of a parity map on the RAID set; this is the default, Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.73 src/sbin/raidctl/raidctl.c:1.74 --- src/sbin/raidctl/raidctl.c:1.73 Sun Aug 1 20:26:53 2021 +++ src/sbin/raidctl/raidctl.c Mon Aug 2 20:31:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.73 2021/08/01 20:26:53 oster Exp $ */ +/* $NetBSD: raidctl.c,v 1.74 2021/08/02 20:31:15 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.73 2021/08/01 20:26:53 oster Exp $"); +__RCSID("$NetBSD: raidctl.c,v 1.74 2021/08/02 20:31:15 oster Exp $"); #endif @@ -133,7 +133,7 @@ main(int argc,char *argv[]) last_unit = 0; openmode = O_RDWR; /* default to read/write */ - while ((ch = getopt(argc, argv, "a:A:Bc:C:f:F:g:GiI:l:mM:r:R:sSpPuU:v")) + while ((ch = getopt(argc, argv, "a:A:Bc:C:f:F:g:GiI:l:LmM:r:R:sSpPuU:v")) != -1) switch(ch) { case 'a': @@ -202,6 +202,10 @@ main(int argc,char *argv[]) get_comp(component, optarg, sizeof(component)); num_options++; break; + case 'L': + action = RAIDFRAME_RESCAN; + num_options++; + break; case 'm': action = RAIDFRAME_PARITYMAP_STATUS; openmode = O_RDONLY; @@ -362,6 +366,9 @@ main(int argc,char *argv[]) do_ioctl(fd, RAIDFRAME_SET_LAST_UNIT, _unit, "RAIDFRAME_SET_LAST_UNIT"); break; + case RAIDFRAME_RESCAN: + do_ioctl(fd, RAIDFRAME_RESCAN, NULL, "RAIDFRAME_RESCAN"); + break; default: break; } Index: src/sys/dev/raidframe/raidframeio.h diff -u src/sys/dev/raidframe/raidframeio.h:1.9 src/sys/dev/raidframe/raidframeio.h:1.10 --- src/sys/dev/raidframe/raidframeio.h:1.9 Sat Jan 20 01:32:45 2018 +++ src/sys/dev/raidframe/raidframeio.h Mon Aug 2 20:31:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: raidframeio.h,v 1.9 2018/01/20 01:32:45 mrg Exp $ */ +/* $NetBSD: raidframeio.h,v 1.10 2021/08/02 20:31:14 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -133,5 +133,6 @@ #define RAIDFRAME_SET_LAST_UNIT _IOW('r', 41, int) #define RAIDFRAME_GET_INFO _IOWR('r', 42, RF_DeviceConfig_t *) /* get configuration */ #define RAIDFRAME_CONFIGURE _IOW ('r', 43, void *) /* configure the driver */ - +#define RAIDFRAME_RESCAN _IO ('r', 44) #endif/* !_RF_RAIDFRAMEIO_H_ */ + Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.397 src/sys/dev/raidframe/rf_netbsdkintf.c:1.398 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.397 Mon Jul 26 22:50:36 2021 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Mon Aug 2 20:31:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.397 2021/07/26 22:50:36 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.398 2021/08/02 20:31:14 oster Exp $
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Sun Aug 1 20:26:53 UTC 2021 Modified Files: src/sbin/raidctl: raidctl.c Log Message: Move case 'l' to be in sorted order. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.72 src/sbin/raidctl/raidctl.c:1.73 --- src/sbin/raidctl/raidctl.c:1.72 Sun Sep 13 06:04:53 2020 +++ src/sbin/raidctl/raidctl.c Sun Aug 1 20:26:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.72 2020/09/13 06:04:53 mlelstv Exp $ */ +/* $NetBSD: raidctl.c,v 1.73 2021/08/01 20:26:53 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.72 2020/09/13 06:04:53 mlelstv Exp $"); +__RCSID("$NetBSD: raidctl.c,v 1.73 2021/08/01 20:26:53 oster Exp $"); #endif @@ -197,6 +197,11 @@ main(int argc,char *argv[]) serial_number = xstrtouint(optarg); num_options++; break; + case 'l': + action = RAIDFRAME_SET_COMPONENT_LABEL; + get_comp(component, optarg, sizeof(component)); + num_options++; + break; case 'm': action = RAIDFRAME_PARITYMAP_STATUS; openmode = O_RDONLY; @@ -214,11 +219,6 @@ main(int argc,char *argv[]) while (i < 3) parityparams[i++] = 0; break; - case 'l': - action = RAIDFRAME_SET_COMPONENT_LABEL; - get_comp(component, optarg, sizeof(component)); - num_options++; - break; case 'r': action = RAIDFRAME_REMOVE_HOT_SPARE; get_comp(component, optarg, sizeof(component));
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Sun Aug 1 20:26:53 UTC 2021 Modified Files: src/sbin/raidctl: raidctl.c Log Message: Move case 'l' to be in sorted order. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jul 27 03:09:27 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_cvscan.c rf_cvscan.h Log Message: Missed cleaning up this "peek" routines the other day. Take care of it now. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_cvscan.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/raidframe/rf_cvscan.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_cvscan.c diff -u src/sys/dev/raidframe/rf_cvscan.c:1.17 src/sys/dev/raidframe/rf_cvscan.c:1.18 --- src/sys/dev/raidframe/rf_cvscan.c:1.17 Sat Feb 9 03:33:59 2019 +++ src/sys/dev/raidframe/rf_cvscan.c Tue Jul 27 03:09:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_cvscan.c,v 1.17 2019/02/09 03:33:59 christos Exp $ */ +/* $NetBSD: rf_cvscan.c,v 1.18 2021/07/27 03:09:26 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -35,7 +35,7 @@ **/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_cvscan.c,v 1.17 2019/02/09 03:33:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_cvscan.c,v 1.18 2021/07/27 03:09:26 oster Exp $"); #include #include "rf_alloclist.h" @@ -272,44 +272,6 @@ rf_CvscanDequeue(void *q_in) return (ret); } - - -RF_DiskQueueData_t * -rf_CvscanPeek(void *q_in) -{ - RF_CvscanHeader_t *hdr = (RF_CvscanHeader_t *) q_in; - longrange, i, sum_dist_left, sum_dist_right; - RF_DiskQueueData_t *tmp, *headElement; - - DO_CHECK_STATE(hdr); - - if (hdr->left_cnt == 0 && hdr->right_cnt == 0) - headElement = NULL; - else { - range = RF_MIN(hdr->range_for_avg, RF_MIN(hdr->left_cnt, hdr->right_cnt)); - for (i = 0, tmp = hdr->left, sum_dist_left = - ((hdr->direction == rf_cvscan_RIGHT) ? range * hdr->change_penalty : 0); - tmp != NULL && i < range; - tmp = tmp->next, i++) { - sum_dist_left += hdr->cur_block - tmp->sectorOffset; - } - for (i = 0, tmp = hdr->right, sum_dist_right = - ((hdr->direction == rf_cvscan_LEFT) ? range * hdr->change_penalty : 0); - tmp != NULL && i < range; - tmp = tmp->next, i++) { - sum_dist_right += tmp->sectorOffset - hdr->cur_block; - } - - if (hdr->right_cnt == 0 || sum_dist_left < sum_dist_right) - headElement = hdr->left; - else - headElement = hdr->right; - } - return (headElement); -} - - - /* ** CVSCAN( 1, 0 ) is Shortest Seek Time First (SSTF) **lowest average response time Index: src/sys/dev/raidframe/rf_cvscan.h diff -u src/sys/dev/raidframe/rf_cvscan.h:1.6 src/sys/dev/raidframe/rf_cvscan.h:1.7 --- src/sys/dev/raidframe/rf_cvscan.h:1.6 Sun Dec 11 12:23:37 2005 +++ src/sys/dev/raidframe/rf_cvscan.h Tue Jul 27 03:09:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_cvscan.h,v 1.6 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_cvscan.h,v 1.7 2021/07/27 03:09:26 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -75,7 +75,6 @@ rf_CvscanCreate(RF_SectorCount_t sect_pe RF_AllocListElem_t * cl_list, RF_ShutdownList_t ** listp); voidrf_CvscanEnqueue(void *qptr, RF_DiskQueueData_t * req, int priority); RF_DiskQueueData_t *rf_CvscanDequeue(void *qptr); -RF_DiskQueueData_t *rf_CvscanPeek(void *qptr); int rf_CvscanPromote(void *qptr, RF_StripeNum_t parityStripeID, RF_ReconUnitNum_t which_ru);
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jul 27 03:09:27 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_cvscan.c rf_cvscan.h Log Message: Missed cleaning up this "peek" routines the other day. Take care of it now. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_cvscan.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/raidframe/rf_cvscan.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jul 27 03:01:48 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_copyback.c rf_dagfuncs.c rf_diskqueue.c rf_diskqueue.h rf_reconstruct.c Log Message: rf_CreateDiskQueueData() no longer uses waitflag, and will always succeed. Cleanup the error path for the (no longer needed) PR_NOWAIT cases. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/raidframe/rf_dagfuncs.c cvs rdiff -u -r1.61 -r1.62 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/raidframe/rf_diskqueue.h cvs rdiff -u -r1.126 -r1.127 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_copyback.c diff -u src/sys/dev/raidframe/rf_copyback.c:1.54 src/sys/dev/raidframe/rf_copyback.c:1.55 --- src/sys/dev/raidframe/rf_copyback.c:1.54 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_copyback.c Tue Jul 27 03:01:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_copyback.c,v 1.54 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_copyback.c,v 1.55 2021/07/27 03:01:48 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -38,7 +38,7 @@ / #include -__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.54 2021/07/23 00:54:45 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.55 2021/07/27 03:01:48 oster Exp $"); #include @@ -335,12 +335,10 @@ rf_CopybackOne(RF_CopybackDesc_t *desc, /* create reqs to read the old location & write the new */ desc->readreq = rf_CreateDiskQueueData(RF_IO_TYPE_READ, spOffs, sectPerSU, desc->databuf, 0L, 0, rf_CopybackReadDoneProc, desc, - NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL, - PR_WAITOK); + NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL); desc->writereq = rf_CreateDiskQueueData(RF_IO_TYPE_WRITE, testOffs, sectPerSU, desc->databuf, 0L, 0, rf_CopybackWriteDoneProc, desc, - NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL, - PR_WAITOK); + NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL); desc->fcol = testCol; /* enqueue the read. the write will go out as part of the callback on Index: src/sys/dev/raidframe/rf_dagfuncs.c diff -u src/sys/dev/raidframe/rf_dagfuncs.c:1.32 src/sys/dev/raidframe/rf_dagfuncs.c:1.33 --- src/sys/dev/raidframe/rf_dagfuncs.c:1.32 Fri Jun 19 19:29:39 2020 +++ src/sys/dev/raidframe/rf_dagfuncs.c Tue Jul 27 03:01:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagfuncs.c,v 1.32 2020/06/19 19:29:39 jdolecek Exp $ */ +/* $NetBSD: rf_dagfuncs.c,v 1.33 2021/07/27 03:01:48 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_dagfuncs.c,v 1.32 2020/06/19 19:29:39 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagfuncs.c,v 1.33 2021/07/27 03:01:48 oster Exp $"); #include #include @@ -280,13 +280,10 @@ rf_DiskReadFuncForThreads(RF_DagNode_t * #else NULL, #endif - (void *) (node->dagHdr->raidPtr), 0, node->dagHdr->bp, PR_NOWAIT); - if (!req) { - (node->wakeFunc) (node, ENOMEM); - } else { - node->dagFuncData = (void *) req; - rf_DiskIOEnqueue(&(dqs[pda->col]), req, priority); - } + (void *) (node->dagHdr->raidPtr), 0, node->dagHdr->bp); + + node->dagFuncData = (void *) req; + rf_DiskIOEnqueue(&(dqs[pda->col]), req, priority); } @@ -314,14 +311,10 @@ rf_DiskWriteFuncForThreads(RF_DagNode_t NULL, #endif (void *) (node->dagHdr->raidPtr), - 0, node->dagHdr->bp, PR_NOWAIT); + 0, node->dagHdr->bp); - if (!req) { - (node->wakeFunc) (node, ENOMEM); - } else { - node->dagFuncData = (void *) req; - rf_DiskIOEnqueue(&(dqs[pda->col]), req, priority); - } + node->dagFuncData = (void *) req; + rf_DiskIOEnqueue(&(dqs[pda->col]), req, priority); } /* * the undo function for disk nodes @@ -343,13 +336,10 @@ rf_DiskUndoFunc(RF_DagNode_t *node) NULL, #endif (void *) (node->dagHdr->raidPtr), - 0, NULL, PR_NOWAIT); - if (!req) - (node->wakeFunc) (node, ENOMEM); - else { - node->dagFuncData = (void *) req; - rf_DiskIOEnqueue(&(dqs[pda->col]), req, RF_IO_NORMAL_PRIORITY); - } + 0, NULL); + + node->dagFuncData = (void *) req; + rf_DiskIOEnqueue(&(dqs[pda->col]), req, RF_IO_NORMAL_PRIORITY); } /* Index: src/sys/dev/raidframe/rf_diskqueue.c diff -u src/sys/dev/raidframe/rf_diskqueue.c:1.61 src/sys/dev/raidframe/rf_diskqueue.c:1.62 --- src/sys/dev/raidframe/rf_diskqueue.c:1.61 Fri Jul 23 20:18:24 2021 +++
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jul 27 03:01:48 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_copyback.c rf_dagfuncs.c rf_diskqueue.c rf_diskqueue.h rf_reconstruct.c Log Message: rf_CreateDiskQueueData() no longer uses waitflag, and will always succeed. Cleanup the error path for the (no longer needed) PR_NOWAIT cases. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/raidframe/rf_dagfuncs.c cvs rdiff -u -r1.61 -r1.62 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/raidframe/rf_diskqueue.h cvs rdiff -u -r1.126 -r1.127 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Jul 26 22:50:36 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Add support for detecting and configuring nested RAID setups at boot. To generate a diff of this commit: cvs rdiff -u -r1.396 -r1.397 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.396 src/sys/dev/raidframe/rf_netbsdkintf.c:1.397 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.396 Fri Jul 23 02:35:14 2021 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Mon Jul 26 22:50:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.396 2021/07/23 02:35:14 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.397 2021/07/26 22:50:36 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.396 2021/07/23 02:35:14 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.397 2021/07/26 22:50:36 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -483,42 +483,56 @@ rf_containsboot(RF_Raid_t *r, device_t b static void rf_buildroothack(RF_ConfigSet_t *config_sets) { + RF_AutoConfig_t *ac_list; RF_ConfigSet_t *cset; RF_ConfigSet_t *next_cset; int num_root; + int raid_added; struct raid_softc *sc, *rsc; struct dk_softc *dksc = NULL; /* XXX gcc -Os: may be used uninit. */ sc = rsc = NULL; num_root = 0; - cset = config_sets; - while (cset != NULL) { - next_cset = cset->next; - if (rf_have_enough_components(cset) && - cset->ac->clabel->autoconfigure == 1) { - sc = rf_auto_config_set(cset); - if (sc != NULL) { -aprint_debug("raid%d: configured ok, rootable %d\n", -sc->sc_unit, cset->rootable); -if (cset->rootable) { - rsc = sc; - num_root++; + + raid_added = 1; + while (raid_added > 0) { + raid_added = 0; + cset = config_sets; + while (cset != NULL) { + next_cset = cset->next; + if (rf_have_enough_components(cset) && + cset->ac->clabel->autoconfigure == 1) { +sc = rf_auto_config_set(cset); +if (sc != NULL) { + aprint_debug("raid%d: configured ok, rootable %d\n", + sc->sc_unit, cset->rootable); + /* We added one RAID set */ + raid_added++; + if (cset->rootable) { + rsc = sc; + num_root++; + } +} else { + /* The autoconfig didn't work :( */ + aprint_debug("Autoconfig failed\n"); + rf_release_all_vps(cset); } } else { -/* The autoconfig didn't work :( */ -aprint_debug("Autoconfig failed\n"); +/* we're not autoconfiguring this set... + release the associated resources */ rf_release_all_vps(cset); } - } else { - /* we're not autoconfiguring this set... - release the associated resources */ - rf_release_all_vps(cset); + /* cleanup */ + rf_cleanup_config_set(cset); + cset = next_cset; + } + if (raid_added > 0) { + /* We added at least one RAID set, so re-scan for recursive RAID */ + ac_list = rf_find_raid_components(); + config_sets = rf_create_auto_sets(ac_list); } - /* cleanup */ - rf_cleanup_config_set(cset); - cset = next_cset; } - + /* if the user has specified what the root device should be then we don't touch booted_device or boothowto... */
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Jul 26 22:50:36 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Add support for detecting and configuring nested RAID setups at boot. To generate a diff of this commit: cvs rdiff -u -r1.396 -r1.397 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 22:34:12 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_raid1.c Log Message: The number of components used must be at least 2. An odd number of components is not allowed. PR bin/45162 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/dev/raidframe/rf_raid1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_raid1.c diff -u src/sys/dev/raidframe/rf_raid1.c:1.38 src/sys/dev/raidframe/rf_raid1.c:1.39 --- src/sys/dev/raidframe/rf_raid1.c:1.38 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_raid1.c Fri Jul 23 22:34:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid1.c,v 1.38 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_raid1.c,v 1.39 2021/07/23 22:34:12 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_raid1.c,v 1.38 2021/07/23 00:54:45 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_raid1.c,v 1.39 2021/07/23 22:34:12 oster Exp $"); #include "rf_raid.h" #include "rf_raid1.h" @@ -65,6 +65,11 @@ rf_ConfigureRAID1(RF_ShutdownList_t **li RF_Raid1ConfigInfo_t *info; RF_RowCol_t i; + /* Sanity check the number of columns... */ + if (raidPtr->numCol < 2 || raidPtr->numCol % 2 != 0) { + return (EINVAL); + } + /* create a RAID level 1 configuration structure */ info = RF_MallocAndAdd(sizeof(*info), raidPtr->cleanupList); if (info == NULL)
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 22:34:12 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_raid1.c Log Message: The number of components used must be at least 2. An odd number of components is not allowed. PR bin/45162 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/dev/raidframe/rf_raid1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 20:18:24 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_diskqueue.c rf_diskqueue.h rf_fifo.c rf_fifo.h rf_sstf.c rf_sstf.h Log Message: Various disk queue "peek" routines were only ever used in the simulator version of RAIDFrame. Remove them from here. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/raidframe/rf_diskqueue.h cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/rf_fifo.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/raidframe/rf_fifo.h cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_sstf.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/raidframe/rf_sstf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_diskqueue.c diff -u src/sys/dev/raidframe/rf_diskqueue.c:1.60 src/sys/dev/raidframe/rf_diskqueue.c:1.61 --- src/sys/dev/raidframe/rf_diskqueue.c:1.60 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_diskqueue.c Fri Jul 23 20:18:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.c,v 1.60 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_diskqueue.c,v 1.61 2021/07/23 20:18:24 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -66,7 +66,7 @@ / #include -__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.60 2021/07/23 00:54:45 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.61 2021/07/23 20:18:24 oster Exp $"); #include @@ -115,36 +115,31 @@ static const RF_DiskQueueSW_t diskqueues rf_FifoCreate, rf_FifoEnqueue, rf_FifoDequeue, - rf_FifoPeek, - rf_FifoPromote}, + rf_FifoPromote}, {"cvscan", /* cvscan */ rf_CvscanCreate, rf_CvscanEnqueue, rf_CvscanDequeue, - rf_CvscanPeek, - rf_CvscanPromote}, + rf_CvscanPromote}, {"sstf", /* shortest seek time first */ rf_SstfCreate, rf_SstfEnqueue, rf_SstfDequeue, - rf_SstfPeek, - rf_SstfPromote}, + rf_SstfPromote}, {"scan", /* SCAN (two-way elevator) */ rf_ScanCreate, rf_SstfEnqueue, rf_ScanDequeue, - rf_ScanPeek, - rf_SstfPromote}, + rf_SstfPromote}, {"cscan", /* CSCAN (one-way elevator) */ rf_CscanCreate, rf_SstfEnqueue, rf_CscanDequeue, - rf_CscanPeek, - rf_SstfPromote}, + rf_SstfPromote}, }; #define NUM_DISK_QUEUE_TYPES (sizeof(diskqueuesw)/sizeof(RF_DiskQueueSW_t)) Index: src/sys/dev/raidframe/rf_diskqueue.h diff -u src/sys/dev/raidframe/rf_diskqueue.h:1.27 src/sys/dev/raidframe/rf_diskqueue.h:1.28 --- src/sys/dev/raidframe/rf_diskqueue.h:1.27 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_diskqueue.h Fri Jul 23 20:18:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.h,v 1.27 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_diskqueue.h,v 1.28 2021/07/23 20:18:24 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -89,7 +89,6 @@ struct RF_DiskQueueSW_s { * system */ void(*Enqueue) (void *, RF_DiskQueueData_t *, int); /* enqueue routine */ RF_DiskQueueData_t *(*Dequeue) (void *); /* dequeue routine */ - RF_DiskQueueData_t *(*Peek) (void *); /* peek at head of queue */ /* the rest are optional: they improve performance, but the driver * will deal with it if they don't exist */ Index: src/sys/dev/raidframe/rf_fifo.c diff -u src/sys/dev/raidframe/rf_fifo.c:1.16 src/sys/dev/raidframe/rf_fifo.c:1.17 --- src/sys/dev/raidframe/rf_fifo.c:1.16 Sat Feb 9 03:34:00 2019 +++ src/sys/dev/raidframe/rf_fifo.c Fri Jul 23 20:18:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_fifo.c,v 1.16 2019/02/09 03:34:00 christos Exp $ */ +/* $NetBSD: rf_fifo.c,v 1.17 2021/07/23 20:18:24 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -36,7 +36,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_fifo.c,v 1.16 2019/02/09 03:34:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_fifo.c,v 1.17 2021/07/23 20:18:24 oster Exp $"); #include @@ -147,23 +147,6 @@ rf_FifoDequeue(void *q_in) return (nd); } -/* Return ptr to item at head of queue. Used to examine request - * info without actually dequeueing the request. - */ -RF_DiskQueueData_t * -rf_FifoPeek(void *q_in) -{ - RF_DiskQueueData_t *headElement = NULL; - RF_FifoHeader_t *q = (RF_FifoHeader_t *) q_in; - - RF_ASSERT(q); - if (q->hq_head) - headElement = q->hq_head; - else - if (q->lq_head) - headElement = q->lq_head; - return (headElement); -} /* We sometimes need to promote a low priority access to a regular priority access. * Currently, this is only used when the user wants to write a stripe which is currently * under reconstruction. Index: src/sys/dev/raidframe/rf_fifo.h diff -u src/sys/dev/raidframe/rf_fifo.h:1.6
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 20:18:24 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_diskqueue.c rf_diskqueue.h rf_fifo.c rf_fifo.h rf_sstf.c rf_sstf.h Log Message: Various disk queue "peek" routines were only ever used in the simulator version of RAIDFrame. Remove them from here. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/raidframe/rf_diskqueue.h cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/rf_fifo.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/raidframe/rf_fifo.h cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_sstf.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/raidframe/rf_sstf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 02:35:14 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_desc.h rf_driver.c rf_driver.h rf_netbsdkintf.c rf_states.c Log Message: All IO is async in the RAIDframe kernel driver, so desc->async_flag isn't needed. Cleanup the flag from rf_DoAccess() and its caller as well. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/rf_desc.h cvs rdiff -u -r1.138 -r1.139 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/raidframe/rf_driver.h cvs rdiff -u -r1.395 -r1.396 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/raidframe/rf_states.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_desc.h diff -u src/sys/dev/raidframe/rf_desc.h:1.21 src/sys/dev/raidframe/rf_desc.h:1.22 --- src/sys/dev/raidframe/rf_desc.h:1.21 Thu Oct 10 03:43:59 2019 +++ src/sys/dev/raidframe/rf_desc.h Fri Jul 23 02:35:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_desc.h,v 1.21 2019/10/10 03:43:59 christos Exp $ */ +/* $NetBSD: rf_desc.h,v 1.22 2021/07/23 02:35:14 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -91,7 +91,6 @@ struct RF_RaidAccessDesc_s { * I/O */ void *callbackArg; /* arg to give to callback func */ RF_RaidAccessDesc_t *next; - int async_flag; RF_Etimer_t timer; /* used for timing this access */ }; #endif/* !_RF__RF_DESC_H_ */ Index: src/sys/dev/raidframe/rf_driver.c diff -u src/sys/dev/raidframe/rf_driver.c:1.138 src/sys/dev/raidframe/rf_driver.c:1.139 --- src/sys/dev/raidframe/rf_driver.c:1.138 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_driver.c Fri Jul 23 02:35:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.c,v 1.138 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_driver.c,v 1.139 2021/07/23 02:35:14 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -66,7 +66,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.138 2021/07/23 00:54:45 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.139 2021/07/23 02:35:14 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_diagnostic.h" @@ -665,13 +665,11 @@ rf_FreeRaidAccDesc(RF_RaidAccessDesc_t * * when either the DAG library is incomplete or there are too many * failures in a parity group. * - * type should be read or write async_flag should be RF_TRUE or - * RF_FALSE bp_in is a buf pointer. void *to facilitate ignoring it - * outside the kernel + * type should be read or write. bp_in is a buf pointer. void *to + * facilitate ignoring it outside the kernel / int -rf_DoAccess(RF_Raid_t * raidPtr, RF_IoType_t type, int async_flag, - RF_RaidAddr_t raidAddress, RF_SectorCount_t numBlocks, +rf_DoAccess(RF_Raid_t * raidPtr, RF_IoType_t type, RF_RaidAddr_t raidAddress, RF_SectorCount_t numBlocks, void *bufPtr, struct buf *bp, RF_RaidAccessFlags_t flags) { RF_RaidAccessDesc_t *desc; @@ -704,7 +702,6 @@ rf_DoAccess(RF_Raid_t * raidPtr, RF_IoTy #if RF_ACC_TRACE > 0 RF_ETIMER_START(desc->tracerec.tot_timer); #endif - desc->async_flag = async_flag; if (raidPtr->parity_map != NULL && type == RF_IO_TYPE_WRITE) Index: src/sys/dev/raidframe/rf_driver.h diff -u src/sys/dev/raidframe/rf_driver.h:1.20 src/sys/dev/raidframe/rf_driver.h:1.21 --- src/sys/dev/raidframe/rf_driver.h:1.20 Sat Dec 26 00:58:45 2015 +++ src/sys/dev/raidframe/rf_driver.h Fri Jul 23 02:35:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.h,v 1.20 2015/12/26 00:58:45 pgoyette Exp $ */ +/* $NetBSD: rf_driver.h,v 1.21 2021/07/23 02:35:14 oster Exp $ */ /* * rf_driver.h */ @@ -52,7 +52,7 @@ RF_RaidAccessDesc_t *rf_AllocRaidAccDesc RF_RaidAccessFlags_t, const RF_AccessState_t *); void rf_FreeRaidAccDesc(RF_RaidAccessDesc_t *); -int rf_DoAccess(RF_Raid_t *, RF_IoType_t, int, RF_RaidAddr_t, +int rf_DoAccess(RF_Raid_t *, RF_IoType_t, RF_RaidAddr_t, RF_SectorCount_t, void *, struct buf *, RF_RaidAccessFlags_t); #if 0 Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.395 src/sys/dev/raidframe/rf_netbsdkintf.c:1.396 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.395 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Fri Jul 23 02:35:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.395 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.396 2021/07/23 02:35:14 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.395 2021/07/23 00:54:45 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 02:35:14 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_desc.h rf_driver.c rf_driver.h rf_netbsdkintf.c rf_states.c Log Message: All IO is async in the RAIDframe kernel driver, so desc->async_flag isn't needed. Cleanup the flag from rf_DoAccess() and its caller as well. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/rf_desc.h cvs rdiff -u -r1.138 -r1.139 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/raidframe/rf_driver.h cvs rdiff -u -r1.395 -r1.396 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/raidframe/rf_states.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 02:18:26 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_netbsd.h Log Message: The 'pss_issued' pool is unused, so remove it. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/raidframe/rf_netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsd.h diff -u src/sys/dev/raidframe/rf_netbsd.h:1.37 src/sys/dev/raidframe/rf_netbsd.h:1.38 --- src/sys/dev/raidframe/rf_netbsd.h:1.37 Fri Jul 23 00:54:45 2021 +++ src/sys/dev/raidframe/rf_netbsd.h Fri Jul 23 02:18:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsd.h,v 1.37 2021/07/23 00:54:45 oster Exp $ */ +/* $NetBSD: rf_netbsd.h,v 1.38 2021/07/23 02:18:26 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -73,7 +73,6 @@ struct RF_Pools_s { struct pool mcpair; /* Mutex/Cond Pairs */ struct pool pda; /* Physical Disk Access structures */ struct pool pss; /* Parity Stripe Status */ - struct pool pss_issued; /* Parity Stripe Status Issued */ struct pool rad; /* Raid Access Descriptors */ struct pool reconbuffer; /* reconstruction buffer (header) pool */ struct pool revent; /* reconstruct events */ @@ -100,7 +99,6 @@ struct RF_PoolNames_s { char mcpair[RF_MAX_POOLNAMELEN]; /* Mutex/Cond Pairs */ char pda[RF_MAX_POOLNAMELEN]; /* Physical Disk Access structures */ char pss[RF_MAX_POOLNAMELEN]; /* Parity Stripe Status */ - char pss_issued[RF_MAX_POOLNAMELEN]; /* Parity Stripe Status Issued */ char rad[RF_MAX_POOLNAMELEN]; /* Raid Access Descriptors */ char reconbuffer[RF_MAX_POOLNAMELEN]; /* reconstruction buffer (header) pool */ char revent[RF_MAX_POOLNAMELEN]; /* reconstruct events */
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 02:18:26 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_netbsd.h Log Message: The 'pss_issued' pool is unused, so remove it. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/raidframe/rf_netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 00:54:45 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_alloclist.c rf_aselect.c rf_callback.c rf_callback.h rf_copyback.c rf_dagdegrd.c rf_dagdegwr.c rf_dagffrd.c rf_dagffwr.c rf_dagutils.c rf_dagutils.h rf_diskqueue.c rf_diskqueue.h rf_driver.c rf_evenodd.c rf_map.c rf_map.h rf_mcpair.c rf_mcpair.h rf_netbsd.h rf_netbsdkintf.c rf_paritylogDiskMgr.c rf_parityscan.c rf_psstatus.c rf_psstatus.h rf_raid.h rf_raid1.c rf_reconbuffer.c rf_reconstruct.c rf_reconstruct.h rf_reconutil.c rf_revent.c rf_revent.h rf_states.c rf_stripelocks.c rf_stripelocks.h Log Message: Extensive mechanical changes to the pools used in RAIDframe. Alloclist remains not per-RAID, so initialize that pool separately/differently than the rest. The remainder of pools in RF_Pools_s are now per-RAID pools. Mostly mechanical changes to functions to allocate/destroy per-RAID pools. Needed to make raidPtr available in certain cases to be able to find the per-RAID pools. Extend rf_pool_init() to now populate a per-RAID wchan value that is unique to each pool for a given RAID device. TODO: Complete the analysis of the minimum number of items that are required for each pool to allow IO to progress (i.e. so that a request for pool resources can always be satisfied), and dynamically scale minimum pool sizes based on RAID configuration. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/raidframe/rf_alloclist.c \ src/sys/dev/raidframe/rf_revent.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/raidframe/rf_aselect.c \ src/sys/dev/raidframe/rf_reconstruct.h cvs rdiff -u -r1.24 -r1.25 src/sys/dev/raidframe/rf_callback.c \ src/sys/dev/raidframe/rf_mcpair.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/raidframe/rf_callback.h cvs rdiff -u -r1.53 -r1.54 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/raidframe/rf_dagdegrd.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/raidframe/rf_dagdegwr.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/rf_dagffrd.c \ src/sys/dev/raidframe/rf_dagutils.h cvs rdiff -u -r1.36 -r1.37 src/sys/dev/raidframe/rf_dagffwr.c \ src/sys/dev/raidframe/rf_netbsd.h src/sys/dev/raidframe/rf_parityscan.c cvs rdiff -u -r1.57 -r1.58 src/sys/dev/raidframe/rf_dagutils.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/raidframe/rf_diskqueue.h \ src/sys/dev/raidframe/rf_reconbuffer.c cvs rdiff -u -r1.137 -r1.138 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/raidframe/rf_evenodd.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/raidframe/rf_map.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/raidframe/rf_map.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/rf_mcpair.h \ src/sys/dev/raidframe/rf_revent.h cvs rdiff -u -r1.394 -r1.395 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/raidframe/rf_paritylogDiskMgr.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/raidframe/rf_psstatus.c \ src/sys/dev/raidframe/rf_raid1.c src/sys/dev/raidframe/rf_reconutil.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/raidframe/rf_psstatus.h cvs rdiff -u -r1.48 -r1.49 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.125 -r1.126 src/sys/dev/raidframe/rf_reconstruct.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/raidframe/rf_states.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/raidframe/rf_stripelocks.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/rf_stripelocks.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_alloclist.c diff -u src/sys/dev/raidframe/rf_alloclist.c:1.28 src/sys/dev/raidframe/rf_alloclist.c:1.29 --- src/sys/dev/raidframe/rf_alloclist.c:1.28 Sun Feb 10 17:13:33 2019 +++ src/sys/dev/raidframe/rf_alloclist.c Fri Jul 23 00:54:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_alloclist.c,v 1.28 2019/02/10 17:13:33 christos Exp $ */ +/* $NetBSD: rf_alloclist.c,v 1.29 2021/07/23 00:54:45 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_alloclist.c,v 1.28 2019/02/10 17:13:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_alloclist.c,v 1.29 2021/07/23 00:54:45 oster Exp $"); #include @@ -59,15 +59,17 @@ static void rf_ShutdownAllocList(void *) static void rf_ShutdownAllocList(void *ignored) { - pool_destroy(_pools.alloclist); + pool_destroy(_alloclist_pool); } int rf_ConfigureAllocList(RF_ShutdownList_t **listp) { - rf_pool_init(_pools.alloclist, sizeof(RF_AllocListElem_t), - "rf_alloclist_pl", RF_AL_FREELIST_MIN, RF_AL_FREELIST_MAX); + pool_init(_alloclist_pool, sizeof(RF_AllocListElem_t), 0, 0, 0, "rf_alloclist_pl", NULL,
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 00:54:45 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_alloclist.c rf_aselect.c rf_callback.c rf_callback.h rf_copyback.c rf_dagdegrd.c rf_dagdegwr.c rf_dagffrd.c rf_dagffwr.c rf_dagutils.c rf_dagutils.h rf_diskqueue.c rf_diskqueue.h rf_driver.c rf_evenodd.c rf_map.c rf_map.h rf_mcpair.c rf_mcpair.h rf_netbsd.h rf_netbsdkintf.c rf_paritylogDiskMgr.c rf_parityscan.c rf_psstatus.c rf_psstatus.h rf_raid.h rf_raid1.c rf_reconbuffer.c rf_reconstruct.c rf_reconstruct.h rf_reconutil.c rf_revent.c rf_revent.h rf_states.c rf_stripelocks.c rf_stripelocks.h Log Message: Extensive mechanical changes to the pools used in RAIDframe. Alloclist remains not per-RAID, so initialize that pool separately/differently than the rest. The remainder of pools in RF_Pools_s are now per-RAID pools. Mostly mechanical changes to functions to allocate/destroy per-RAID pools. Needed to make raidPtr available in certain cases to be able to find the per-RAID pools. Extend rf_pool_init() to now populate a per-RAID wchan value that is unique to each pool for a given RAID device. TODO: Complete the analysis of the minimum number of items that are required for each pool to allow IO to progress (i.e. so that a request for pool resources can always be satisfied), and dynamically scale minimum pool sizes based on RAID configuration. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/raidframe/rf_alloclist.c \ src/sys/dev/raidframe/rf_revent.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/raidframe/rf_aselect.c \ src/sys/dev/raidframe/rf_reconstruct.h cvs rdiff -u -r1.24 -r1.25 src/sys/dev/raidframe/rf_callback.c \ src/sys/dev/raidframe/rf_mcpair.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/raidframe/rf_callback.h cvs rdiff -u -r1.53 -r1.54 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/raidframe/rf_dagdegrd.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/raidframe/rf_dagdegwr.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/rf_dagffrd.c \ src/sys/dev/raidframe/rf_dagutils.h cvs rdiff -u -r1.36 -r1.37 src/sys/dev/raidframe/rf_dagffwr.c \ src/sys/dev/raidframe/rf_netbsd.h src/sys/dev/raidframe/rf_parityscan.c cvs rdiff -u -r1.57 -r1.58 src/sys/dev/raidframe/rf_dagutils.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/raidframe/rf_diskqueue.h \ src/sys/dev/raidframe/rf_reconbuffer.c cvs rdiff -u -r1.137 -r1.138 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/raidframe/rf_evenodd.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/raidframe/rf_map.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/raidframe/rf_map.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/rf_mcpair.h \ src/sys/dev/raidframe/rf_revent.h cvs rdiff -u -r1.394 -r1.395 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/raidframe/rf_paritylogDiskMgr.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/raidframe/rf_psstatus.c \ src/sys/dev/raidframe/rf_raid1.c src/sys/dev/raidframe/rf_reconutil.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/raidframe/rf_psstatus.h cvs rdiff -u -r1.48 -r1.49 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.125 -r1.126 src/sys/dev/raidframe/rf_reconstruct.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/raidframe/rf_states.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/raidframe/rf_stripelocks.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/rf_stripelocks.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 00:26:20 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_diskqueue.c rf_netbsd.h Log Message: getiobuf() can return NULL if there are no IO buffers available. RAIDframe can't deal with that, so create a dedicated pool of buffers to use for IO. PR_WAITOK is fine here, as we pre-allocate more than we need to guarantee IO can make progress. Tuning of pool still to come. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/raidframe/rf_netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_diskqueue.c diff -u src/sys/dev/raidframe/rf_diskqueue.c:1.58 src/sys/dev/raidframe/rf_diskqueue.c:1.59 --- src/sys/dev/raidframe/rf_diskqueue.c:1.58 Fri Jun 19 19:32:03 2020 +++ src/sys/dev/raidframe/rf_diskqueue.c Fri Jul 23 00:26:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.c,v 1.58 2020/06/19 19:32:03 jdolecek Exp $ */ +/* $NetBSD: rf_diskqueue.c,v 1.59 2021/07/23 00:26:19 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -66,7 +66,7 @@ / #include -__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.58 2020/06/19 19:32:03 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.59 2021/07/23 00:26:19 oster Exp $"); #include @@ -84,6 +84,8 @@ __KERNEL_RCSID(0, "$NetBSD: rf_diskqueue #include "rf_fifo.h" #include "rf_kintf.h" +#include + static void rf_ShutdownDiskQueueSystem(void *); #ifndef RF_DEBUG_DISKQUEUE @@ -147,10 +149,15 @@ static const RF_DiskQueueSW_t diskqueues }; #define NUM_DISK_QUEUE_TYPES (sizeof(diskqueuesw)/sizeof(RF_DiskQueueSW_t)) + #define RF_MAX_FREE_DQD 256 #define RF_MIN_FREE_DQD 64 -#include +/* XXX: scale these... */ +#define RF_MAX_FREE_BUFIO 256 +#define RF_MIN_FREE_BUFIO 64 + + /* configures a single disk queue */ @@ -189,6 +196,7 @@ static void rf_ShutdownDiskQueueSystem(void *ignored) { pool_destroy(_pools.dqd); + pool_destroy(_pools.bufio); } int @@ -197,6 +205,8 @@ rf_ConfigureDiskQueueSystem(RF_ShutdownL rf_pool_init(_pools.dqd, sizeof(RF_DiskQueueData_t), "rf_dqd_pl", RF_MIN_FREE_DQD, RF_MAX_FREE_DQD); + rf_pool_init(_pools.bufio, sizeof(buf_t), + "rf_bufio_pl", RF_MIN_FREE_BUFIO, RF_MAX_FREE_BUFIO); rf_ShutdownCreate(listp, rf_ShutdownDiskQueueSystem, NULL); return (0); @@ -367,19 +377,20 @@ rf_CreateDiskQueueData(RF_IoType_t typ, { RF_DiskQueueData_t *p; - p = pool_get(_pools.dqd, waitflag | PR_ZERO); - if (p == NULL) - return (NULL); + p = pool_get(_pools.dqd, PR_WAITOK | PR_ZERO); + KASSERT(p != NULL); - if (waitflag == PR_WAITOK) { - p->bp = getiobuf(NULL, true); - } else { - p->bp = getiobuf(NULL, false); - } - if (p->bp == NULL) { - pool_put(_pools.dqd, p); - return (NULL); - } + /* Obtain a buffer from our own pool. It is possible for the + regular getiobuf() to run out of memory and return NULL. + We need to guarantee that never happens, as RAIDframe + doesn't have a good way to recover if memory allocation + fails here. + */ + p->bp = pool_get(_pools.bufio, PR_WAITOK | PR_ZERO); + KASSERT(p->bp != NULL); + + buf_init(p->bp); + SET(p->bp->b_cflags, BC_BUSY); /* mark buffer busy */ if (mbp) { SET(p->bp->b_flags, mbp->b_flags & rf_b_pass); @@ -405,6 +416,6 @@ rf_CreateDiskQueueData(RF_IoType_t typ, void rf_FreeDiskQueueData(RF_DiskQueueData_t *p) { - putiobuf(p->bp); + pool_put(_pools.bufio, p->bp); pool_put(_pools.dqd, p); } Index: src/sys/dev/raidframe/rf_netbsd.h diff -u src/sys/dev/raidframe/rf_netbsd.h:1.35 src/sys/dev/raidframe/rf_netbsd.h:1.36 --- src/sys/dev/raidframe/rf_netbsd.h:1.35 Fri Jun 19 19:29:39 2020 +++ src/sys/dev/raidframe/rf_netbsd.h Fri Jul 23 00:26:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsd.h,v 1.35 2020/06/19 19:29:39 jdolecek Exp $ */ +/* $NetBSD: rf_netbsd.h,v 1.36 2021/07/23 00:26:19 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -61,6 +61,7 @@ struct RF_Pools_s { struct pool asm_hdr; /* Access Stripe Map Header */ struct pool asmap; /* Access Stripe Map */ struct pool asmhle; /* Access Stripe Map Header List Elements */ + struct pool bufio; /* Buffer IO Pool */ struct pool callbackf; /* Callback function descriptors */ struct pool callbackv; /* Callback value descriptors */ struct pool dagh;/* DAG headers */
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 23 00:26:20 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_diskqueue.c rf_netbsd.h Log Message: getiobuf() can return NULL if there are no IO buffers available. RAIDframe can't deal with that, so create a dedicated pool of buffers to use for IO. PR_WAITOK is fine here, as we pre-allocate more than we need to guarantee IO can make progress. Tuning of pool still to come. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/raidframe/rf_netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Jul 21 23:10:12 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_shutdown.c Log Message: Remove commented line that is a duplicate of a real line. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/raidframe/rf_shutdown.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_shutdown.c diff -u src/sys/dev/raidframe/rf_shutdown.c:1.20 src/sys/dev/raidframe/rf_shutdown.c:1.21 --- src/sys/dev/raidframe/rf_shutdown.c:1.20 Wed Dec 17 20:51:34 2008 +++ src/sys/dev/raidframe/rf_shutdown.c Wed Jul 21 23:10:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_shutdown.c,v 1.20 2008/12/17 20:51:34 cegger Exp $ */ +/* $NetBSD: rf_shutdown.c,v 1.21 2021/07/21 23:10:12 oster Exp $ */ /* * rf_shutdown.c */ @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rf_shutdown.c,v 1.20 2008/12/17 20:51:34 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_shutdown.c,v 1.21 2021/07/21 23:10:12 oster Exp $"); #include @@ -71,8 +71,6 @@ _rf_ShutdownCreate(RF_ShutdownList_t **l * Have to directly allocate memory here, since we start up before * and shutdown after RAIDframe internal allocation system. */ - /* ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), - M_RAIDFRAME, M_WAITOK); */ ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), M_RAIDFRAME, M_WAITOK); ent->cleanup = cleanup;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Jul 21 23:10:12 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_shutdown.c Log Message: Remove commented line that is a duplicate of a real line. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/raidframe/rf_shutdown.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Feb 15 23:27:03 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_reconstruct.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_reconstruct.c diff -u src/sys/dev/raidframe/rf_reconstruct.c:1.124 src/sys/dev/raidframe/rf_reconstruct.c:1.125 --- src/sys/dev/raidframe/rf_reconstruct.c:1.124 Sun Dec 8 12:14:40 2019 +++ src/sys/dev/raidframe/rf_reconstruct.c Mon Feb 15 23:27:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.124 2019/12/08 12:14:40 mlelstv Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.125 2021/02/15 23:27:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ / #include -__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.124 2019/12/08 12:14:40 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.125 2021/02/15 23:27:03 oster Exp $"); #include #include @@ -616,7 +616,7 @@ rf_ContinueReconstructFailedDisk(RF_Raid 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 @@ rf_ContinueReconstructFailedDisk(RF_Raid raidPtr->reconControl->lastPSID = lastPSID; if (pending_writes > lastPSID) - pending_writes = lastPSID; + pending_writes = lastPSID + 1; /* start the actual reconstruction */ @@ -796,7 +796,6 @@ rf_ContinueReconstructFailedDisk(RF_Raid 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) {
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Feb 15 23:27:03 UTC 2021 Modified Files: src/sys/dev/raidframe: rf_reconstruct.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jun 16 14:45:08 UTC 2020 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Improve wording in comments in raid_dumpblock(). To generate a diff of this commit: cvs rdiff -u -r1.382 -r1.383 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.382 src/sys/dev/raidframe/rf_netbsdkintf.c:1.383 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.382 Mon Apr 13 00:27:17 2020 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Jun 16 14:45:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.382 2020/04/13 00:27:17 chs Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.383 2020/06/16 14:45:08 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.382 2020/04/13 00:27:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.383 2020/06/16 14:45:08 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -689,10 +689,10 @@ raid_dumpblocks(device_t dev, void *va, /* Look for a component to dump to. The preference for the component to dump to is as follows: - 1) the master - 2) a used_spare of the master - 3) the slave - 4) a used_spare of the slave + 1) the first component + 2) a used_spare of the first component + 3) the second component + 4) a used_spare of the second component */ dumpto = -1; @@ -705,10 +705,9 @@ raid_dumpblocks(device_t dev, void *va, } /* - At this point we have possibly selected a live master or a - live slave. We now check to see if there is a spared - master (or a spared slave), if we didn't find a live master - or a live slave. + At this point we have possibly selected a live component. + If we didn't find a live ocmponent, we now check to see + if there is a relevant spared component. */ for (c = 0; c < raidPtr->numSpare; c++) { @@ -724,24 +723,25 @@ raid_dumpblocks(device_t dev, void *va, } if (scol == 0) { /* - We must have found a spared master! - We'll take that over anything else - found so far. (We couldn't have - found a real master before, since - this is a used spare, and it's - saying that it's replacing the - master.) On reboot (with + We must have found a spared first + component! We'll take that over + anything else found so far. (We + couldn't have found a real first + component before, since this is a + used spare, and it's saying that + it's replacing the first + component.) On reboot (with autoconfiguration turned on) - sparecol will become the 1st - component (component0) of this set. + sparecol will become the first + component (component0) of this set. */ dumpto = sparecol; break; } else if (scol != -1) { /* - Must be a spared slave. We'll dump - to that if we havn't found anything - else so far. + Must be a spared second component. + We'll dump to that if we havn't found + anything else so far. */ if (dumpto == -1) dumpto = sparecol;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jun 16 14:45:08 UTC 2020 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Improve wording in comments in raid_dumpblock(). To generate a diff of this commit: cvs rdiff -u -r1.382 -r1.383 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: oster Date: Mon Jan 6 01:37:57 UTC 2020 Modified Files: src/sys/sys: sched.h Log Message: Build fix. Add back inclusion of , which was previously included via . To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/sys/sched.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sched.h diff -u src/sys/sys/sched.h:1.83 src/sys/sys/sched.h:1.84 --- src/sys/sys/sched.h:1.83 Sun Jan 5 20:26:56 2020 +++ src/sys/sys/sched.h Mon Jan 6 01:37:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sched.h,v 1.83 2020/01/05 20:26:56 ad Exp $ */ +/* $NetBSD: sched.h,v 1.84 2020/01/06 01:37:57 oster Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008, 2019 @@ -71,6 +71,7 @@ #define _SYS_SCHED_H_ #include +#include #include #if defined(_KERNEL_OPT)
CVS commit: src/sys/sys
Module Name:src Committed By: oster Date: Mon Jan 6 01:37:57 UTC 2020 Modified Files: src/sys/sys: sched.h Log Message: Build fix. Add back inclusion of , which was previously included via . To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/sys/sched.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: oster Date: Sun Sep 1 17:50:32 UTC 2019 Modified Files: src/share/man/man9: copy.9 intro.9 uiomove.9 Log Message: s/Xr store/Xr ustore/ to fix cross-references in these man-pages. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/copy.9 cvs rdiff -u -r1.24 -r1.25 src/share/man/man9/intro.9 cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/uiomove.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: oster Date: Sun Sep 1 17:50:32 UTC 2019 Modified Files: src/share/man/man9: copy.9 intro.9 uiomove.9 Log Message: s/Xr store/Xr ustore/ to fix cross-references in these man-pages. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/copy.9 cvs rdiff -u -r1.24 -r1.25 src/share/man/man9/intro.9 cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/uiomove.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/copy.9 diff -u src/share/man/man9/copy.9:1.20 src/share/man/man9/copy.9:1.21 --- src/share/man/man9/copy.9:1.20 Thu Feb 8 09:03:23 2018 +++ src/share/man/man9/copy.9 Sun Sep 1 17:50:32 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: copy.9,v 1.20 2018/02/08 09:03:23 dholland Exp $ +.\" $NetBSD: copy.9,v 1.21 2019/09/01 17:50:32 oster Exp $ .\" .\" Copyright (c) 1996, 2002 Jason R. Thorpe. .\" All rights reserved. @@ -177,4 +177,4 @@ if the string is longer than bytes. .Sh SEE ALSO .Xr fetch 9 , -.Xr store 9 +.Xr ustore 9 Index: src/share/man/man9/intro.9 diff -u src/share/man/man9/intro.9:1.24 src/share/man/man9/intro.9:1.25 --- src/share/man/man9/intro.9:1.24 Wed May 8 14:25:39 2019 +++ src/share/man/man9/intro.9 Sun Sep 1 17:50:32 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: intro.9,v 1.24 2019/05/08 14:25:39 isaki Exp $ +.\" $NetBSD: intro.9,v 1.25 2019/09/01 17:50:32 oster Exp $ .\" .\" Copyright (c) 1997, 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -322,7 +322,7 @@ See .Pp Store data to user-space. See -.Xr store 9 . +.Xr ustore 9 . .Pp Fetch data from user-space. See Index: src/share/man/man9/uiomove.9 diff -u src/share/man/man9/uiomove.9:1.18 src/share/man/man9/uiomove.9:1.19 --- src/share/man/man9/uiomove.9:1.18 Mon Jul 3 21:28:48 2017 +++ src/share/man/man9/uiomove.9 Sun Sep 1 17:50:32 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: uiomove.9,v 1.18 2017/07/03 21:28:48 wiz Exp $ +.\" $NetBSD: uiomove.9,v 1.19 2019/09/01 17:50:32 oster Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -151,4 +151,4 @@ is returned. .Sh SEE ALSO .Xr copy 9 , .Xr fetch 9 , -.Xr store 9 +.Xr ustore 9
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Wed Feb 6 22:38:10 UTC 2019 Modified Files: src/sbin/raidctl: raidctl.c Log Message: Correct printed IOCTL name that was incorrect since rev 1.5. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.68 src/sbin/raidctl/raidctl.c:1.69 --- src/sbin/raidctl/raidctl.c:1.68 Mon Feb 4 09:31:22 2019 +++ src/sbin/raidctl/raidctl.c Wed Feb 6 22:38:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.68 2019/02/04 09:31:22 mrg Exp $ */ +/* $NetBSD: raidctl.c,v 1.69 2019/02/06 22:38:10 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.68 2019/02/04 09:31:22 mrg Exp $"); +__RCSID("$NetBSD: raidctl.c,v 1.69 2019/02/06 22:38:10 oster Exp $"); #endif @@ -823,7 +823,7 @@ init_component_labels(int fd, int serial component_label.status = 0; do_ioctl( fd, RAIDFRAME_INIT_LABELS, _label, - "RAIDFRAME_SET_COMPONENT_LABEL"); + "RAIDFRAME_INIT_LABELS"); } static void
CVS commit: src/sbin/raidctl
Module Name:src Committed By: oster Date: Wed Feb 6 22:38:10 UTC 2019 Modified Files: src/sbin/raidctl: raidctl.c Log Message: Correct printed IOCTL name that was incorrect since rev 1.5. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sbin/raidctl/raidctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 03:37:13 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Fix GET_INFO. Yes, can probably be simplified. To generate a diff of this commit: cvs rdiff -u -r1.370 -r1.371 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.370 src/sys/dev/raidframe/rf_netbsdkintf.c:1.371 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.370 Wed Feb 6 03:01:48 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Wed Feb 6 03:37:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -1399,7 +1399,7 @@ raidioctl(dev_t dev, u_long cmd, void *d RF_Raid_t *raidPtr; RF_AccTotals_t *totals; RF_SingleComponent_t component; - RF_DeviceConfig_t *d_cfg; + RF_DeviceConfig_t *d_cfg, *ucfgp; int retcode = 0; int column; RF_ComponentLabel_t *clabel; @@ -1513,13 +1513,14 @@ raidioctl(dev_t dev, u_long cmd, void *d return rf_rebuild_in_place(raidPtr, data); case RAIDFRAME_GET_INFO: + ucfgp = *(RF_DeviceConfig_t **)data; RF_Malloc(d_cfg, sizeof(RF_DeviceConfig_t), (RF_DeviceConfig_t *)); if (d_cfg == NULL) return ENOMEM; retcode = rf_get_info(raidPtr, d_cfg); if (retcode == 0) { - retcode = copyout(d_cfg, data, sizeof(*d_cfg)); + retcode = copyout(d_cfg, ucfgp, sizeof(*d_cfg)); } RF_Free(d_cfg, sizeof(RF_DeviceConfig_t)); return retcode;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 03:37:13 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Fix GET_INFO. Yes, can probably be simplified. To generate a diff of this commit: cvs rdiff -u -r1.370 -r1.371 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 02:49:51 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Fix logic inversion. Progress, but still broken. To generate a diff of this commit: cvs rdiff -u -r1.368 -r1.369 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.368 src/sys/dev/raidframe/rf_netbsdkintf.c:1.369 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.368 Wed Feb 6 02:49:09 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Wed Feb 6 02:49:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -1067,7 +1067,7 @@ rf_must_be_initialized(const struct raid case RAIDFRAME_SET_AUTOCONFIG: case RAIDFRAME_SET_COMPONENT_LABEL: case RAIDFRAME_SET_ROOT: - return (rs->sc_flags & RAIDF_INITED) != 0; + return (rs->sc_flags & RAIDF_INITED) == 0; } return false; }
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 02:49:51 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Fix logic inversion. Progress, but still broken. To generate a diff of this commit: cvs rdiff -u -r1.368 -r1.369 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 02:49:09 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsd.h rf_netbsdkintf.c rf_raid.h Log Message: Shuffle softc declarations to a different .h file. Create missing rf_get_raid(). Things compile, but don't work correctly. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/raidframe/rf_netbsd.h cvs rdiff -u -r1.367 -r1.368 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/raidframe/rf_raid.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsd.h diff -u src/sys/dev/raidframe/rf_netbsd.h:1.32 src/sys/dev/raidframe/rf_netbsd.h:1.33 --- src/sys/dev/raidframe/rf_netbsd.h:1.32 Tue Feb 5 23:28:02 2019 +++ src/sys/dev/raidframe/rf_netbsd.h Wed Feb 6 02:49:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsd.h,v 1.32 2019/02/05 23:28:02 christos Exp $ */ +/* $NetBSD: rf_netbsd.h,v 1.33 2019/02/06 02:49:09 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -103,11 +103,4 @@ typedef struct RF_ConfigSet_s { struct RF_ConfigSet_s *next; } RF_ConfigSet_t; -int rf_fail_disk(RF_Raid_t *, struct rf_recon_req *); - -int rf_inited(const struct raid_softc *); -int rf_get_unit(const struct raid_softc *); -RF_Raid_t *rf_get_raid(struct raid_softc *); -int rf_construct(struct raid_softc *, RF_Config_t *); - #endif /* _RF__RF_NETBSDSTUFF_H_ */ Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.367 src/sys/dev/raidframe/rf_netbsdkintf.c:1.368 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.367 Tue Feb 5 23:28:02 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Wed Feb 6 02:49:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.367 2019/02/05 23:28:02 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.367 2019/02/05 23:28:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -182,7 +182,6 @@ static void KernelWakeupFunc(struct buf static void InitBP(struct buf *, struct vnode *, unsigned, dev_t, RF_SectorNum_t, RF_SectorCount_t, void *, void (*) (struct buf *), void *, int, struct proc *); -struct raid_softc; static void raidinit(struct raid_softc *); static int raiddoaccess(RF_Raid_t *raidPtr, struct buf *bp); static int rf_get_component_caches(RF_Raid_t *raidPtr, int *); @@ -250,26 +249,6 @@ static struct dkdriver rf_dkdriver = { .d_minphys = minphys }; -struct raid_softc { - struct dk_softc sc_dksc; - int sc_unit; - int sc_flags; /* flags */ - int sc_cflags; /* configuration flags */ - kmutex_t sc_mutex; /* interlock mutex */ - kcondvar_t sc_cv; /* and the condvar */ - uint64_t sc_size; /* size of the raid device */ - charsc_xname[20]; /* XXX external name */ - RF_Raid_t sc_r; - LIST_ENTRY(raid_softc) sc_link; -}; -/* sc_flags */ -#define RAIDF_INITED 0x01 /* unit has been initialized */ -#define RAIDF_SHUTDOWN 0x02 /* unit is being shutdown */ -#define RAIDF_DETACH 0x04 /* detach after final close */ -#define RAIDF_WANTED 0x08 /* someone waiting to obtain a lock */ -#define RAIDF_LOCKED 0x10 /* unit is locked */ -#define RAIDF_UNIT_CHANGED 0x20 /* unit is being changed */ - #define raidunit(x) DISKUNIT(x) #define raidsoftc(dev) (((struct raid_softc *)device_private(dev))->sc_r.softc) @@ -460,6 +439,11 @@ rf_inited(const struct raid_softc *rs) { return (rs->sc_flags & RAIDF_INITED) != 0; } +RF_Raid_t * +rf_get_raid(struct raid_softc *rs) { + return >sc_r; +} + int rf_get_unit(const struct raid_softc *rs) { return rs->sc_unit; Index: src/sys/dev/raidframe/rf_raid.h diff -u src/sys/dev/raidframe/rf_raid.h:1.46 src/sys/dev/raidframe/rf_raid.h:1.47 --- src/sys/dev/raidframe/rf_raid.h:1.46 Tue Jan 8 07:18:18 2019 +++ src/sys/dev/raidframe/rf_raid.h Wed Feb 6 02:49:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid.h,v 1.46 2019/01/08 07:18:18 mrg Exp $ */ +/* $NetBSD: rf_raid.h,v 1.47 2019/02/06 02:49:09 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -305,4 +305,33 @@ struct RF_Raid_s { #endif/* RF_INCLUDE_PARITYLOGGING > 0 */ struct rf_paritymap *parity_map; }; + +struct raid_softc { + struct dk_softc sc_dksc; + int sc_unit; + int sc_flags; /* flags */ + int sc_cflags; /* configuration flags */ + kmutex_t sc_mutex; /* interlock mutex */ + kcondvar_t sc_cv; /* and the condvar */ + uint64_t sc_size; /* size of the raid device */ + charsc_xname[20]; /* XXX external name */ + RF_Raid_t sc_r; +
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 02:49:09 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsd.h rf_netbsdkintf.c rf_raid.h Log Message: Shuffle softc declarations to a different .h file. Create missing rf_get_raid(). Things compile, but don't work correctly. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/raidframe/rf_netbsd.h cvs rdiff -u -r1.367 -r1.368 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/raidframe/rf_raid.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jan 29 23:42:06 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_compat80.c Log Message: Need to return EPASSTHROUGH for ioctls that arn't handled in compat. Thanks to mlelstv for finding this! To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/raidframe/rf_compat80.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_compat80.c diff -u src/sys/dev/raidframe/rf_compat80.c:1.4 src/sys/dev/raidframe/rf_compat80.c:1.5 --- src/sys/dev/raidframe/rf_compat80.c:1.4 Tue Jan 29 09:28:50 2019 +++ src/sys/dev/raidframe/rf_compat80.c Tue Jan 29 23:42:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat80.c,v 1.4 2019/01/29 09:28:50 pgoyette Exp $ */ +/* $NetBSD: rf_compat80.c,v 1.5 2019/01/29 23:42:06 oster Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -242,7 +242,7 @@ int error; case RAIDFRAME_FAIL_DISK80: return EPASSTHROUGH; default: - return EINVAL; + return EPASSTHROUGH; } switch (cmd) {
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Tue Jan 29 23:42:06 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_compat80.c Log Message: Need to return EPASSTHROUGH for ioctls that arn't handled in compat. Thanks to mlelstv for finding this! To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/raidframe/rf_compat80.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/gnu-efi/dist/lib
Module Name:src Committed By: oster Date: Sun Jan 27 04:17:39 UTC 2019 Modified Files: src/sys/external/bsd/gnu-efi/dist/lib: print.c Log Message: Fix merge issue. (leftover line) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/lib/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/gnu-efi/dist/lib/print.c diff -u src/sys/external/bsd/gnu-efi/dist/lib/print.c:1.3 src/sys/external/bsd/gnu-efi/dist/lib/print.c:1.4 --- src/sys/external/bsd/gnu-efi/dist/lib/print.c:1.3 Sun Jan 27 02:08:43 2019 +++ src/sys/external/bsd/gnu-efi/dist/lib/print.c Sun Jan 27 04:17:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.3 2019/01/27 02:08:43 pgoyette Exp $ */ +/* $NetBSD: print.c,v 1.4 2019/01/27 04:17:39 oster Exp $ */ /*++ @@ -532,7 +532,6 @@ Returns: _PoolCatPrint (fmt, args, , _PoolPrint); return spc.str; } ->>> 1.1.1.1.34.1 CHAR16 * PoolPrint (
CVS commit: src/sys/external/bsd/gnu-efi/dist/lib
Module Name:src Committed By: oster Date: Sun Jan 27 04:17:39 UTC 2019 Modified Files: src/sys/external/bsd/gnu-efi/dist/lib: print.c Log Message: Fix merge issue. (leftover line) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/lib/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: oster Date: Sun Jan 27 04:15:11 UTC 2019 Modified Files: src/usr.sbin/sysinst: defs.h Log Message: Remove extra #ifdef and duplicated set of #ifdef's. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/sysinst/defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: oster Date: Sun Jan 27 04:15:11 UTC 2019 Modified Files: src/usr.sbin/sysinst: defs.h Log Message: Remove extra #ifdef and duplicated set of #ifdef's. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/sysinst/defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.30 src/usr.sbin/sysinst/defs.h:1.31 --- src/usr.sbin/sysinst/defs.h:1.30 Sun Jan 27 02:08:51 2019 +++ src/usr.sbin/sysinst/defs.h Sun Jan 27 04:15:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.30 2019/01/27 02:08:51 pgoyette Exp $ */ +/* $NetBSD: defs.h,v 1.31 2019/01/27 04:15:11 oster Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -368,14 +368,6 @@ int clean_xfer_dir; #if !defined(PKG_ARCH_SUBDIR) #define PKG_ARCH_SUBDIR MACH #endif -#endif - -#if !defined(ARCH_SUBDIR) -#define ARCH_SUBDIR MACH -#endif -#if !defined(PKG_ARCH_SUBDIR) -#define PKG_ARCH_SUBDIR MACH -#endif #if !defined(SYSINST_PKG_HOST) #define SYSINST_PKG_HOST "ftp.NetBSD.org"
CVS commit: src/external/bsd/flex/dist/src
Module Name:src Committed By: oster Date: Sun Jan 27 03:19:42 UTC 2019 Modified Files: src/external/bsd/flex/dist/src: libmain.c Log Message: Remove extra #endif. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/libmain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/flex/dist/src
Module Name:src Committed By: oster Date: Sun Jan 27 03:19:42 UTC 2019 Modified Files: src/external/bsd/flex/dist/src: libmain.c Log Message: Remove extra #endif. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/libmain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/flex/dist/src/libmain.c diff -u src/external/bsd/flex/dist/src/libmain.c:1.5 src/external/bsd/flex/dist/src/libmain.c:1.6 --- src/external/bsd/flex/dist/src/libmain.c:1.5 Sun Jan 27 02:08:34 2019 +++ src/external/bsd/flex/dist/src/libmain.c Sun Jan 27 03:19:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: libmain.c,v 1.5 2019/01/27 02:08:34 pgoyette Exp $ */ +/* $NetBSD: libmain.c,v 1.6 2019/01/27 03:19:42 oster Exp $ */ /* libmain - flex run-time support library "main" function */ @@ -25,8 +25,7 @@ #ifndef HAVE_NBTOOL_CONFIG_H #include #ifdef __RCSID -__RCSID("$NetBSD: libmain.c,v 1.5 2019/01/27 02:08:34 pgoyette Exp $"); -#endif +__RCSID("$NetBSD: libmain.c,v 1.6 2019/01/27 03:19:42 oster Exp $"); #endif #endif
Re: CVS commit: src/sys/arch
On Tue, 11 Dec 2018 15:23:01 + Robert Swindells wrote: > "Maya Rashish" wrote: > >Module Name:src > >Committed By: maya > >Date: Tue Dec 11 11:00:18 UTC 2018 > > > >Modified Files: > >src/sys/arch/amd64/conf: GENERIC > >src/sys/arch/i386/conf: GENERIC > > > >Log Message: > >disable nouveau. it hasn't been functional since the import of new > >drmkms code. > > Nouveau works fine for me. > > Can we at least get some more data on which GPUs don't work ? drm kern info: nouveau [ DEVICE][nouveau0] Chipset: GF108 (NVC1) drm kern info: nouveau [ DEVICE][nouveau0] Family : NVC0 Works great with 8.0. Gets into a funky loop of some sort: [ 69.9188746] kern info: nouveau: user:001f906e:fff9: fini children... [ 69.9188746] kern info: nouveau: user:001f906e:fff9: fini running... [ 69.9188746] kern info: nouveau: user::: fini children... [ 69.9188746] kern info: nouveau: user::: fini running... [ 69.9188746] kern info: nouveau: user::: fini completed in 31us [ 69.9188746] kern info: nouveau: user:001f906e:fff9: fini completed in 130us [ 69.9188746] kern info: nouveau: user:001f906e:fff9: destroy children... [ 69.9188746] kern info: nouveau: user:001f906e:fff9: destroy running... with -current, and fails to display anything more than a black screen. Additional details happily provided on request. Later... Greg Oster
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sat Jun 9 21:18:41 UTC 2018 Modified Files: src/sys/dev/raidframe: rf_layout.h Log Message: Fix two mis-spellings in comments. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_layout.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_layout.h diff -u src/sys/dev/raidframe/rf_layout.h:1.17 src/sys/dev/raidframe/rf_layout.h:1.18 --- src/sys/dev/raidframe/rf_layout.h:1.17 Sun Mar 4 06:02:38 2007 +++ src/sys/dev/raidframe/rf_layout.h Sat Jun 9 21:18:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_layout.h,v 1.17 2007/03/04 06:02:38 christos Exp $ */ +/* $NetBSD: rf_layout.h,v 1.18 2018/06/09 21:18:41 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -88,7 +88,7 @@ struct RF_RaidLayout_s { * The mapping code returns a pointer to a list of AccessStripeMap structures, which * describes all the mapping information about an access. The list contains one * AccessStripeMap structure per stripe touched by the access. Each element in the list - * contains a stripe identifier and a pointer to a list of PhysDiskAddr structuress. Each + * contains a stripe identifier and a pointer to a list of PhysDiskAddr structures. Each * element in this latter list describes the physical location of a stripe unit accessed * within the corresponding stripe. * @@ -192,7 +192,7 @@ typedef struct RF_FailedStripe_s RF_Fail struct RF_FailedStripe_s { RF_VoidFunctionPointerListElem_t *vfple; /* linked list of pointers to DAG creation functions for stripes */ - RF_VoidFunctionPointerListElem_t *bvfple; /* linked list of poitners to DAG creation + RF_VoidFunctionPointerListElem_t *bvfple; /* linked list of pointers to DAG creation functions for blocks */ RF_ASMHeaderListElem_t *asmh_u;/* Access Stripe Map Headers for regular stripes */
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sat Jun 9 21:18:41 UTC 2018 Modified Files: src/sys/dev/raidframe: rf_layout.h Log Message: Fix two mis-spellings in comments. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_layout.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Sat Oct 15 20:31:15 UTC 2016 Modified Files: src/sys/dev/raidframe: rf_map.c Log Message: Cleanup/remove unused asm_count. Reported by David Binderman in PR#51552. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/dev/raidframe/rf_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_map.c diff -u src/sys/dev/raidframe/rf_map.c:1.46 src/sys/dev/raidframe/rf_map.c:1.47 --- src/sys/dev/raidframe/rf_map.c:1.46 Fri Nov 14 14:45:34 2014 +++ src/sys/dev/raidframe/rf_map.c Sat Oct 15 20:31:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_map.c,v 1.46 2014/11/14 14:45:34 oster Exp $ */ +/* $NetBSD: rf_map.c,v 1.47 2016/10/15 20:31:15 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ **/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.46 2014/11/14 14:45:34 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.47 2016/10/15 20:31:15 oster Exp $"); #include @@ -557,7 +557,7 @@ rf_FreeAccessStripeMap(RF_AccessStripeMa { RF_AccessStripeMap_t *p; RF_PhysDiskAddr_t *pdp, *trailer, *pdaList = NULL, *pdaEnd = NULL; - int count = 0, t, asm_count = 0; + int count = 0, t; for (p = hdr->stripeMap; p; p = p->next) { @@ -598,8 +598,6 @@ rf_FreeAccessStripeMap(RF_AccessStripeMa } if (trailer) pdaEnd = trailer; - - asm_count++; } /* debug only */
Re: CVS commit: src/sbin/mount
On Sat, 8 Oct 2016 06:47:59 + "Maya Rashish" <m...@netbsd.org> wrote: > Module Name: src > Committed By: maya > Date: Sat Oct 8 06:47:59 UTC 2016 > > Modified Files: > src/sbin/mount: mount.c > > Log Message: > change warning message > > previously attempting to use mount -t ext2 like myself would result in > the warning "mount: mount_ext2 not found for /mnt", which (if you're > me) can be misunderstood as "/mnt is not an ext2 filesystem"... > > change it to "mount: mount_ext2 not found" Consider running the following: - #!/bin/sh mount -t ext2 /dev/sd0e /mnt1 mount -t ext2 /dev/sd1e /mnt2 mount -t ext2 /dev/sd2e /mnt3 mount -t ext2 /dev/sd3e /mnt4 - and getting the message: mount: mount_ext2 not found Now: which of those mounts failed? (No, I don't care for this change at all, as I don't think it really helps anything, and it significantly reduces the amount of useful information provided by the warning...) Later... Greg Oster
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Nov 14 14:29:16 UTC 2014 Modified Files: src/sys/dev/raidframe: raidframevar.h rf_netbsdkintf.c rf_reconstruct.c Log Message: Fix a long-standing bug related to rebooting while a reconstruct-to-spare is underway but not yet complete. The issue was that a component was being marked as a used_spare when the rebuild started, not when the rebuild was actually finished. Marking it as a used_spare meant that the component label on the spare was being updated such that after a reboot the component would be considered up-to-date, regardless of whether the rebuild actually completed! This fix includes: 1) Add an additional state rf_ds_rebuilding_spare which is used to denote that a spare is currently being rebuilt from the live components. 2) Update the comments on the disk states, which were out-of-sync with reality. 3) When rebuilding to a spare component, that spare now enters the state rf_ds_rebuilding_spare instead of the state rf_ds_used_spare. 4) When the rebuild is actually complete then the spare component enters the rf_ds_used_spare state. rf_ds_used_spare is now used exclusively for the case where the rebuilding to the spare has completed successfully. XXX: Someday we need to teach raidctl(8) about this new state, and take out the backwards compatibility code in rf_netbsdkintf.c (see RAIDFRAME_GET_INFO in raidioctl()). For today, this fix needs to be generic enough that it can get backported without major grief. XXX: Needs pullup to netbsd-5*, netbsd-6*, and netbsd-7 Fixes PR#49244. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/raidframevar.h cvs rdiff -u -r1.315 -r1.316 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.120 -r1.121 src/sys/dev/raidframe/rf_reconstruct.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/raidframevar.h diff -u src/sys/dev/raidframe/raidframevar.h:1.16 src/sys/dev/raidframe/raidframevar.h:1.17 --- src/sys/dev/raidframe/raidframevar.h:1.16 Fri Feb 28 10:16:51 2014 +++ src/sys/dev/raidframe/raidframevar.h Fri Nov 14 14:29:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: raidframevar.h,v 1.16 2014/02/28 10:16:51 skrll Exp $ */ +/* $NetBSD: raidframevar.h,v 1.17 2014/11/14 14:29:16 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -383,17 +383,17 @@ struct RF_SparetWait_s { * IF YOU ADD A STATE, CHECK TO SEE IF YOU NEED TO MODIFY RF_DEAD_DISK(). */ enum RF_DiskStatus_e { -rf_ds_optimal, /* no problems */ -rf_ds_failed, /* reconstruction ongoing */ -rf_ds_reconstructing, /* reconstruction complete to spare, dead disk - * not yet replaced */ -rf_ds_dist_spared, /* reconstruction complete to distributed + rf_ds_optimal, /* no problems */ + rf_ds_failed, /* disk has failed */ + rf_ds_reconstructing, /* reconstruction ongoing */ + rf_ds_dist_spared, /* reconstruction complete to distributed * spare space, dead disk not yet replaced */ -rf_ds_spared, /* reconstruction complete to distributed - * spare space, dead disk not yet replaced */ -rf_ds_spare,/* an available spare disk */ -rf_ds_used_spare/* a spare which has been used, and hence is + rf_ds_spared, /* reconstruction complete, dead disk not + yet replaced */ + rf_ds_spare,/* an available spare disk */ + rf_ds_used_spare, /* a spare which has been used, and hence is * not available */ + rf_ds_rebuilding_spare /* a spare which is being rebuilt to */ }; typedef enum RF_DiskStatus_e RF_DiskStatus_t; Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.315 src/sys/dev/raidframe/rf_netbsdkintf.c:1.316 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.315 Tue Nov 4 07:51:55 2014 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Fri Nov 14 14:29:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.315 2014/11/04 07:51:55 mlelstv Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.316 2014/11/14 14:29:16 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.315 2014/11/04 07:51:55 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.316 2014/11/14 14:29:16 oster Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -1532,6 +1532,10 @@ raidioctl(dev_t dev, u_long cmd, void *d } for (j = d_cfg-cols, i = 0; i d_cfg-nspares; i++, j++) { d_cfg-spares[i] =
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Nov 14 14:45:34 UTC 2014 Modified Files: src/sys/dev/raidframe: rf_map.c Log Message: Adjust comment to reflect reality. (5th arg, not 4th) To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/raidframe/rf_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_map.c diff -u src/sys/dev/raidframe/rf_map.c:1.45 src/sys/dev/raidframe/rf_map.c:1.46 --- src/sys/dev/raidframe/rf_map.c:1.45 Wed May 11 18:13:12 2011 +++ src/sys/dev/raidframe/rf_map.c Fri Nov 14 14:45:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_map.c,v 1.45 2011/05/11 18:13:12 mrg Exp $ */ +/* $NetBSD: rf_map.c,v 1.46 2014/11/14 14:45:34 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ **/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_map.c,v 1.45 2011/05/11 18:13:12 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: rf_map.c,v 1.46 2014/11/14 14:45:34 oster Exp $); #include dev/raidframe/raidframevar.h @@ -848,7 +848,7 @@ rf_ASMParityAdjust(RF_PhysDiskAddr_t *to } /* Check if a disk has been spared or failed. If spared, redirect the - * I/O. If it has been failed, record it in the asm pointer. Fourth + * I/O. If it has been failed, record it in the asm pointer. Fifth * arg is whether data or parity. */ void rf_ASMCheckStatus(RF_Raid_t *raidPtr, RF_PhysDiskAddr_t *pda_p,