freebsd-dev/sys
Alan Somers cd037f075c MFV r323789: 8473 scrub does not detect errors on active spares
illumos/illumos-gate@554675eee7
554675eee7

https://www.illumos.org/issues/8473
Scrubbing is supposed to detect and repair all errors in the pool. However,
it wrongly ignores active spare devices. The problem can easily be
reproduced in OpenZFS at git rev 0ef125d with these commands:

truncate -s 64m /tmp/a /tmp/b /tmp/c
sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c
sudo zpool replace testpool /tmp/a /tmp/c
/bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c
sync
sudo zpool scrub testpool
zpool status testpool # Will show 0 errors, which is wrong
sudo zpool offline testpool /tmp/a
sudo zpool scrub testpool
zpool status testpool # Will show errors on /tmp/c,
		      # which should've already been fixed

FreeBSD head is partially affected: the first scrub will detect some errors, but the second scrub will detect more.

Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

MFC after:	1 week
Sponsored by:	Spectra Logic Corp
2017-09-20 16:31:00 +00:00
..
amd64 Do not do torn writes to active LDTs. 2017-09-19 17:57:04 +00:00
arm Define CPU_XSCALE_CORE3 when relevant. 2017-09-19 23:41:55 +00:00
arm64 Fix indentation for r323068 2017-09-19 20:40:05 +00:00
boot loader: biosmem allocate heap just below 4GB 2017-09-18 15:17:01 +00:00
bsm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
cam Add kern.features flag for MMCCAM 2017-09-18 20:17:08 +00:00
cddl MFV r323789: 8473 scrub does not detect errors on active spares 2017-09-20 16:31:00 +00:00
compat linsysfs: quiet gcc -Wformat after r323692 2017-09-18 19:09:40 +00:00
conf Miscellaneous fixes and improvements to MMCCAM stack 2017-09-15 19:47:44 +00:00
contrib Don't use an apostrophe in a possesive pronoun. 2017-09-18 19:16:41 +00:00
crypto aesni: quiet -Wcast-qual 2017-08-16 22:54:35 +00:00
ddb Rename mkdumpheader() and group EKCD functions in kern_shutdown.c. 2017-08-18 04:04:09 +00:00
dev Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval 2017-09-19 23:26:27 +00:00
fs Make the nfsrpc_layoutget() function a static. 2017-09-19 23:28:22 +00:00
gdb
geom gmirror: treat ENXIO as disk disconnect, not media error 2017-09-15 13:57:08 +00:00
gnu Update DTS files from Linux 4.12 2017-07-09 13:53:32 +00:00
i386 Fix indentation for r323068 2017-09-19 20:40:05 +00:00
isa Use better hard-coded defaults for the cursor shape, and remove nearby 2017-08-19 19:33:16 +00:00
kern Do not vrele() covered vnode under the mp mutex. 2017-09-19 16:49:45 +00:00
kgssapi
libkern x86/crc32_sse42.c: quiet unused function warning 2017-08-11 17:05:31 +00:00
mips Add MIPS32/64 Rev2 CP0 intctl register definitions. 2017-09-15 19:56:21 +00:00
modules Give icee(4) a detach() method so it can be used as a module. Add a 2017-09-17 22:58:13 +00:00
net In r288122, we changed vm_page_unwire() so that it returns a Boolean 2017-09-20 04:59:52 +00:00
net80211 net80211: fix a typo (premable -> preamble). 2017-08-27 22:13:03 +00:00
netgraph Check return value from soaccept(). 2017-06-14 16:13:20 +00:00
netinet Fix a warning. 2017-09-19 20:24:13 +00:00
netinet6 Fix a locking issue found by Coverity scanning the usrsctp library. 2017-09-09 20:51:54 +00:00
netipsec Fix possible double releasing for SA reference. 2017-09-01 11:51:07 +00:00
netpfil pf_get_sport(): Prevent possible endless loop when searching for an unused nat port 2017-08-08 21:09:26 +00:00
netsmb
nfs Improve FHA locality control for NFS read/write requests. 2017-07-31 15:23:19 +00:00
nfsclient Add an NFSv4.1 mount option for "use one openowner". 2017-04-13 21:54:19 +00:00
nfsserver
nlm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ofed Remove unsafe access to the LinuxKPI file structure from ibcore. 2017-09-09 06:34:20 +00:00
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Fix indentation for r323068 2017-09-19 20:40:05 +00:00
riscv Sync with amd64/arm/arm64/i386/mips pmap change r288256: 2017-09-20 04:19:49 +00:00
rpc Listening sockets improvements. 2017-06-08 21:30:34 +00:00
security Sprinkle __read_frequently on few obvious places. 2017-09-06 20:33:33 +00:00
sparc64 Fix indentation for r323068 2017-09-19 20:40:05 +00:00
sys Bump the __FreeBSD_version after recent LinuxKPI changes. 2017-09-18 13:39:51 +00:00
teken Fix syscons escape sequence for setting the local cursor type. This sequence 2017-08-18 15:40:40 +00:00
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools make.conf: Add the possibility to use another DTC 2017-06-17 23:34:53 +00:00
ufs Add UFS_LINK_MAX for the UFS-specific limit on link counts. 2017-09-18 23:30:39 +00:00
vm For unlinked files, do not msync(2) or sync on the vnode deactivation. 2017-09-19 16:46:37 +00:00
x86 MCA: Expand AMD Thresholding support to cover all banks 2017-09-17 22:58:13 +00:00
xdr * limit size of buffers to RPC_MAXDATASIZE 2017-06-01 06:12:25 +00:00
xen
Makefile Remove glimpse make target added in r181432 2017-05-22 15:53:30 +00:00