freebsd-nq/sys
Alan Somers 7ac72c256f vdev_geom may associate multiple vdevs per g_consumer
vdev_geom.c currently uses the g_consumer's private field to point to a
vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For
example, when you remove a disk, the vdev's status will change to REMOVED.
However, vdev_geom will sometimes attach multiple vdevs to the same GEOM
consumer. If this happens, then geom events will only be propagated to one
of the vdevs.

Fix this by storing a linked list of vdevs in g_consumer's private field.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

* g_consumer.private now stores a linked list of vdev pointers associated
  with the consumer instead of just a single vdev pointer.

* Change vdev_geom_set_physpath's signature to more closely match
  vdev_geom_set_rotation_rate

* Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed
  that we've already accessed the consumer by the time we get here.

* Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it
  in vdev_geom_open, after we know that the open has succeeded.

PR:		218634
Reviewed by:	gibbs
MFC after:	1 week
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D10391
2017-05-11 16:26:56 +00:00
..
amd64 pcicfg: Fix direct calls of pci_cfg{read,write} on systems w/o PCI host bridge. 2017-05-04 05:28:46 +00:00
arm Disable the build of the static/embedded DTB for the ARMADA38X kernel. 2017-05-09 18:12:05 +00:00
arm64 Add reclaim_pv_chunk on arm64. This is based on the amd64 code so should 2017-05-05 10:01:27 +00:00
boot DIRDEPS_BUILD: Update dependencies. 2017-05-09 01:48:23 +00:00
bsm Merge OpenBSM 1.2-alpha5 from vendor branch to FreeBSD -CURRENT: 2017-03-26 21:14:49 +00:00
cam Add basic programmable early warning error injection to the sa(4) driver. 2017-05-05 20:00:53 +00:00
cddl vdev_geom may associate multiple vdevs per g_consumer 2017-05-11 16:26:56 +00:00
compat Fix init order in the LinuxKPI for RCU support. 2017-05-09 12:51:42 +00:00
conf hyperv/vmbus: Reorganize vmbus device tree 2017-05-10 05:28:14 +00:00
contrib Add necessary bits to get FreeBSD booting on the Unifi Security Gateway 2017-05-07 22:04:12 +00:00
crypto Fix counter increment in Salsa and ChaCha. 2017-04-22 01:06:23 +00:00
ddb Fix printing of negative offsets (typically from frame pointers) again. 2017-03-26 18:46:35 +00:00
dev Improve error messages during command timeout for the mpr and mps 2017-05-11 15:19:04 +00:00
fs ext2fs: add read-write support for Extended Attributes. 2017-05-03 22:35:41 +00:00
gdb
geom Synchronize unclean mirrors before adding them to a running gmirror. 2017-05-02 23:29:42 +00:00
gnu [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code. 2017-05-06 06:20:34 +00:00
i386 Use kmem_malloc() instead of malloc(9) for the native amd64 filter. 2017-04-17 22:02:09 +00:00
isa
kern - Also outside of the KOBJOPLOOKUP macro - which in turn is used by 2017-05-08 21:08:39 +00:00
kgssapi
libkern armv8 has support for optional CRC32C instructions. This patch checks if they are 2017-04-27 17:53:05 +00:00
mips Add initial support for the floating point implementation register. 2017-05-09 17:35:16 +00:00
modules hyperv/vmbus: Reorganize vmbus device tree 2017-05-10 05:28:14 +00:00
net Persistently store NIC's hardware MAC address, and add a way to retrive it 2017-05-11 06:46:39 +00:00
net80211 [net80211] add methods to fetch the global and per-VAP WME parameters. 2017-04-22 02:12:07 +00:00
netgraph Make cached Bluetooth LE host advertise information visible from userland. 2017-04-27 15:03:24 +00:00
netinet There is no good reason for TCP reassembly zone to be UMA_ZONE_NOFREE. 2017-05-10 23:32:31 +00:00
netinet6 ip6_output runs with the inp lock held, just like ip_output. 2017-05-10 00:14:55 +00:00
netipsec Fix SP refcount leak. 2017-04-26 00:34:05 +00:00
netpfil pf: Fix vnet initialisation 2017-05-07 14:33:58 +00:00
netsmb
nfs
nfsclient Add an NFSv4.1 mount option for "use one openowner". 2017-04-13 21:54:19 +00:00
nfsserver
nlm
ofed All these files need sys/vmmeter.h, but now they got it implicitly 2017-04-17 17:07:00 +00:00
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Fix stack tracing in dtrace for powerpc 2017-05-11 00:23:51 +00:00
riscv Follow r317061 "Remove struct vmmeter from struct pcpu" 2017-04-19 17:06:32 +00:00
rpc Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). 2017-05-07 12:12:45 +00:00
security Break audit_bsm_klib.c into two files: one (audit_bsm_klib.c) 2017-04-03 10:15:58 +00:00
sparc64 Fix a bug introduced as part of r287726; use the right device_t for 2017-04-29 00:53:17 +00:00
sys Persistently store NIC's hardware MAC address, and add a way to retrive it 2017-05-10 22:13:47 +00:00
teken Oops, my fix for bright colors broke bright black some more (in cases 2017-03-27 10:48:28 +00:00
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools
ufs Remove spl() calls from UFS code. 2017-05-07 14:59:45 +00:00
vm Emulate pre-r317061 ABI. 2017-05-02 18:40:41 +00:00
x86 x86 MCA: Fix a deadlock in MCA exception processing 2017-04-28 18:25:10 +00:00
xdr
xen
Makefile Fix "make cscope-clean" when .OBJDIR already exists 2017-05-01 05:59:52 +00:00