freebsd-dev/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin f106f43aa2 Matching GUIDs, handle possible race on vdev detach.
In case of vdev detach, causing top level mirror vdev destruction, leaf
vdev changes its GUID to one of the destroyed mirror, that creates race
condition when GUID in vdev label may not match one in the pool config.

This change replicates logic nuance of vdev_validate() by adding special
exception, matching the vdev GUID against the top level vdev GUID.
Since this exception is not completely reliable (may give false positives
if we fail to erase label on detached vdev), use it only as last resort.

Quick way to reproduce this scenario now is detach vdev from a pool with
enabled autoextend.  During vdev detach autoextend logic tries to reopen
remaining vdev, that always fails now since in-memory configuration is
already updated, while on-disk labels are not yet.

MFC after:	2 weeks
2016-10-28 16:21:31 +00:00
..
sys MFV r307313: 2016-10-14 12:01:33 +00:00
arc.c MFV r305560: 7278 tuning zfs_arc_max does not impact arc_c_min 2016-09-07 20:05:10 +00:00
blkptr.c
bplist.c
bpobj.c
bptree.c MFV r302661: 7082 bptree_iterate() passes wrong args to zfs_dbgmsg() 2016-09-01 15:10:40 +00:00
bqueue.c
dbuf.c MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs 2016-09-28 23:54:47 +00:00
ddt_zap.c
ddt.c
dmu_diff.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
dmu_object.c
dmu_objset.c MFV r307314: 2016-10-14 12:03:04 +00:00
dmu_send.c MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs 2016-09-28 23:54:47 +00:00
dmu_traverse.c Add #ifdef _KERNEL around send_holes_without_birth_time sysctl. 2016-09-29 17:48:53 +00:00
dmu_tx.c MFC r305337: 7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object 2016-09-03 11:00:29 +00:00
dmu_zfetch.c
dmu.c MFC r305337: 7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object 2016-09-03 11:00:29 +00:00
dnode_sync.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
dnode.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
dsl_bookmark.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
dsl_dataset.c MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs 2016-09-28 23:54:47 +00:00
dsl_deadlist.c
dsl_deleg.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
dsl_destroy.c MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs 2016-09-28 23:54:47 +00:00
dsl_dir.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
dsl_pool.c MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs 2016-09-28 23:54:47 +00:00
dsl_prop.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
dsl_scan.c MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs 2016-09-28 23:54:47 +00:00
dsl_synctask.c
dsl_userhold.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
edonr_zfs.c
gzip.c
lz4.c MFV r268120: 2016-09-11 17:48:06 +00:00
lzjb.c
metaslab.c MFV r304155: 7090 zfs should improve allocation order and throttle allocations 2016-09-03 10:04:37 +00:00
multilist.c
range_tree.c
refcount.c MFV r304155: 7090 zfs should improve allocation order and throttle allocations 2016-09-03 10:04:37 +00:00
rrwlock.c
sa.c
sha256.c
skein_zfs.c
spa_config.c
spa_errlog.c
spa_history.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
spa_misc.c MFV r304155: 7090 zfs should improve allocation order and throttle allocations 2016-09-03 10:04:37 +00:00
spa.c MFV r307313: 2016-10-14 12:01:33 +00:00
space_map.c
space_reftree.c
THIRDPARTYLICENSE.lz4
THIRDPARTYLICENSE.lz4.descrip
trim_map.c
txg.c
uberblock.c
unique.c
vdev_cache.c MFV r304155: 7090 zfs should improve allocation order and throttle allocations 2016-09-03 10:04:37 +00:00
vdev_disk.c MFV r303077: 2016-09-03 08:42:12 +00:00
vdev_file.c
vdev_geom.c Matching GUIDs, handle possible race on vdev detach. 2016-10-28 16:21:31 +00:00
vdev_label.c
vdev_mirror.c MFV r304155: 7090 zfs should improve allocation order and throttle allocations 2016-09-03 10:04:37 +00:00
vdev_missing.c
vdev_queue.c MFV r304155: 7090 zfs should improve allocation order and throttle allocations 2016-09-03 10:04:37 +00:00
vdev_raidz.c
vdev_root.c
vdev.c MFV r307313: 2016-10-14 12:01:33 +00:00
zap_leaf.c
zap_micro.c Missed FreeBSD-specific piece of r305338. 2016-09-03 11:17:33 +00:00
zap.c MFC r305337: 7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object 2016-09-03 11:00:29 +00:00
zfeature.c
zfs_acl.c
zfs_byteswap.c
zfs_ctldir.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
zfs_debug.c
zfs_dir.c
zfs_fm.c
zfs_fuid.c
zfs_ioctl.c MFV r307313: 2016-10-14 12:01:33 +00:00
zfs_log.c
zfs_onexit.c
zfs_replay.c
zfs_rlock.c
zfs_sa.c
zfs_vfsops.c Limit scope of the optimization in r306608 to dounmount() caller only. 2016-10-07 11:38:28 +00:00
zfs_vnops.c Fix a race in vm_page_busy_sleep(9). 2016-10-13 14:41:05 +00:00
zfs_znode.c implement zfs_vptocnp() using z_parent property 2016-10-07 06:29:24 +00:00
zfs.conf
zil.c Add vfs.zfs.zil_log_limit sysctl. 2016-10-16 18:49:15 +00:00
zio_checksum.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
zio_compress.c
zio_inject.c
zio.c MFV r304155: 7090 zfs should improve allocation order and throttle allocations 2016-09-03 10:04:37 +00:00
zle.c
zrlock.c 3746 ZRLs are racy 2016-10-27 07:38:07 +00:00
zvol.c Fix panic after ZVOL renamed to name invalid for DEVFS. 2016-10-24 12:24:24 +00:00