freebsd-nq/sys
Conrad Meyer bc1ee0be2d gmirror: Evaluate mirror components against newest metadata copy
If we happen to taste a stale mirror component first, don't reject valid,
newer components that have differing metadata from the stale component
(during STARTING).  Instead, update our view of the most recent metadata as
we taste components.

Like mediasize beforehand, remove some checks from g_mirror_check_metadata
which would evict valid components due to metadata that can change over a
mirror's lifetime.  g_mirror_check_metadata is invoked long before we check
genid/syncid and decide which component(s) are newest and whether or not we
have quorum.

Before checking if we can enter RUNNING (i.e., we have quorum) after a NEW
component is added, first remove any known stale or inconsistent disks from
the mirrorset, rather than removing them *after* deciding we have quorum.
Check if we have quorum after removing these components.

Additionally, add a knob, kern.geom.mirror.launch_mirror_before_timeout, to
force gmirrors to wait out the full timeout (kern.geom.mirror.timeout)
before transitioning from STARTING to RUNNING.  This is a kludge to help
ensure all eligible, boot-time available mirror components are tasted before
RUNNING a gmirror.

When we are instructed to forget mirror components, bump the generation id
to avoid confusion with such stale components later.

Add a basic test case for STARTING -> RUNNING startup behavior around stale
genids.

PR:		232671, 232835
Submitted by:	Cindy Yang <cyang AT isilon.com> (previous version)
Reviewed by:	markj (kernel portions)
Discussed with:	asomers, Cindy Yang
Tested by:	pho
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D18062
2018-12-06 23:55:39 +00:00
..
amd64 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
arm Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
arm64 Build the dtb for the rock64 board. 2018-12-02 19:36:20 +00:00
bsm
cam NVME trim clocking 2018-11-27 00:36:35 +00:00
cddl zfs: we can boot from dataset with large_dnode enabled 2018-12-03 19:35:21 +00:00
compat Remove redundant declaration after r341517. 2018-12-05 15:56:44 +00:00
conf Fix LINT build after r341572. 2018-12-05 15:42:31 +00:00
contrib Remove an ugly Ultrix hack. Ultrix has been AWOL since the last ice 2018-12-06 20:15:54 +00:00
crypto rijndael (AES): Avoid leaking sensitive data on kernel stack 2018-10-26 20:53:01 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev Fix build with option RSS, removing unused variables. 2018-12-06 21:52:40 +00:00
dts arm64: allwinner: Add 792Mhz frequency to sun50i-a64-opp 2018-11-30 10:31:30 +00:00
fs Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
gdb
geom gmirror: Evaluate mirror components against newest metadata copy 2018-12-06 23:55:39 +00:00
gnu Update our devicetree to 4.19 for arm and arm64 2018-11-10 21:02:32 +00:00
i386 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Let kern.trap_enotcap be set as a tunable. 2018-12-06 17:29:37 +00:00
kgssapi
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Add CAPABILITIES to the ERL kernel config so that tools that have been 2018-11-28 13:25:10 +00:00
modules mlx5fpga_tools initial code import. 2018-12-05 14:17:22 +00:00
net netmap.h: include stdatomic.h 2018-12-05 15:38:52 +00:00
net80211 Fix misspellings of transmitter/transmitted 2018-08-10 20:37:32 +00:00
netgraph ng_source(4): correction after the change r340617 2018-11-27 04:05:38 +00:00
netinet Clamp the INPCB port hash tables to IPPORT_MAX + 1 chains. 2018-12-05 17:06:00 +00:00
netinet6 Clamp the INPCB port hash tables to IPPORT_MAX + 1 chains. 2018-12-05 17:06:00 +00:00
netipsec Add sadb_x_sa2 extension to SADB_ACQUIRE requests. 2018-10-21 14:19:16 +00:00
netpfil pfsync: Performance improvement 2018-12-06 19:27:15 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed ipoib: Notify on modify QP failure only when relevant 2018-12-05 13:27:17 +00:00
opencrypto Add sha224 to the authctx union. 2018-10-23 18:07:37 +00:00
powerpc powerpc: Set very low priority mode while waiting for AP unleash event 2018-12-06 04:36:02 +00:00
riscv Fix reporting of SS_ONSTACK 2018-11-30 22:44:33 +00:00
rpc
security audit: predict AUDITING_TD as false 2018-11-29 09:19:48 +00:00
sparc64 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
sys sx: retire SX_NOADAPTIVE 2018-12-05 16:43:03 +00:00
teken Implement ECMA-48 "REP", some Linuxen have started emitting them recently. 2018-10-21 08:29:36 +00:00
tests
tools Use ${ECHO} in dtb/dtbo build, pass in from dtb.mk for -s 2018-11-09 18:56:40 +00:00
ufs If the vfs.ffs.dotrimcons sysctl option is enabled while a file 2018-12-06 01:04:56 +00:00
vm Normalize COMPAT_43 syscall declarations. 2018-12-04 16:48:47 +00:00
x86 Add definitions for Intel Speed Shift 2018-11-21 00:21:58 +00:00
xdr
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile