freebsd-dev/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin 0b51a59fc7 MFV r303078:
7086 ztest attempts dva_get_dsize_sync on an embedded blockpointer

illumos/illumos-gate@926549256b
https://github.com/illumos/illumos-gate/commit/926549256b71acd595f69b236779ff6b7
8fa08ef

https://www.illumos.org/issues/7086
  In dbuf_dirty(), we need to grab the dn_struct_rwlock before looking at the
  db_blkptr, to prevent it from being changed by syncing context.
  Otherwise we may see that ztest got a segfault from this stack:
  libzpool.so.1`dva_get_dsize_sync+0x98(872f000, b32b240, fed7811b, 0, b4cda20,
0)
  libzpool.so.1`bp_get_dsize+0x60(872f000, b32b240, 0, 97cb780, 9d4c1a8, 0)
  libzpool.so.1`dbuf_dirty+0x9b3(ce0a100, 97cb780, 9, fecd2530)
  libzpool.so.1`dmu_buf_will_dirty+0xc3(ce0a100, 97cb780, ea293d6c, 1)
  libzpool.so.1`zap_lockdir+0x1a0(8aaa3c0, 1, 0, 97cb780, 1, 1)
  libzpool.so.1`zap_remove_norm+0x30(8aaa3c0, 1, 0, 8728b10, 0, 97cb780)
  libzpool.so.1`zap_remove+0x29(8aaa3c0, 1, 0, 8728b10, 97cb780, a)
  ztest_replay_remove+0x225(ea294588, 8728ae8, 0, 38010000, 0, 0)
  ztest_remove+0x9f(ea294588, ea293f50, 4, 3)
  ztest_object_init+0x78(ea294588, ea293f50, 4e0, 1)
  ztest_dmu_object_alloc_free+0x71(ea294588, 13)
  ztest_dmu_objset_create_destroy+0x224(80cef08, 13, 0, 805d36c, 9017ad44, 0)
  ztest_execute+0x89(a, 807c720, 13, 0)
  ztest_thread+0xea(13, 0, 0, 0)
  libc.so.1`_thrp_setup+0x88(f0983240)
  libc.so.1`_lwp_start(f0983240, 0, 0, 0, 0, 0)
  Looking into it a bit, we see that this is an embedded blockpointer, so
  BP_GET_NDVAS should have returned 0:
       b32b240::blkptr
  EMBEDDED [L0 ZAP_OTHER] et=0 LZ4 size=200L/4aP birth=80L
  Instead, it looks like another thread is modifying this blockpointer:
       b32b240::ugrep | ::whatis
  f47a0e0c is in [ stack tid=0x19f ]
  ebd6ec40 is in [ stack tid=0x226 ]
  ea293bd0 is in [ stack tid=0x244 ]
  ea293be4 is in [ stack tid=0x244 ]

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>
2016-09-03 08:43:43 +00:00
..
sys MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
arc.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
blkptr.c
bplist.c
bpobj.c MFV r296518: 5027 zfs large block support (add copyright) 2016-03-08 17:51:09 +00:00
bptree.c MFV r302661: 7082 bptree_iterate() passes wrong args to zfs_dbgmsg() 2016-09-01 15:10:40 +00:00
bqueue.c MFV r286704: 5960 zfs recv should prefetch indirect blocks 2015-08-12 22:41:06 +00:00
dbuf.c MFV r303078: 2016-09-03 08:43:43 +00:00
ddt_zap.c
ddt.c MFV r289310: 2015-10-16 14:45:21 +00:00
dmu_diff.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
dmu_object.c MFV r296609: 6370 ZFS send fails to transmit some holes 2016-03-10 09:01:19 +00:00
dmu_objset.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
dmu_send.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
dmu_traverse.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
dmu_tx.c MFV r302651: 7054 dmu_tx_hold_t should use refcount_t to track space 2016-09-01 14:38:25 +00:00
dmu_zfetch.c MFV r297831: 6322 ZFS indirect block predictive prefetch 2016-04-11 21:09:15 +00:00
dmu.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +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 r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
dsl_deadlist.c MFV r296518: 5027 zfs large block support (add copyright) 2016-03-08 17:51:09 +00:00
dsl_deleg.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
dsl_destroy.c MFV r296518: 5027 zfs large block support (add copyright) 2016-03-08 17:51:09 +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 Allow ZFS ARC min / max to be tuned at runtime 2016-06-29 07:55:45 +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 r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +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 MFV r289310: 2015-10-16 14:45:21 +00:00
gzip.c
lz4.c
lzjb.c
metaslab.c MFV r303077: 2016-09-03 08:42:12 +00:00
multilist.c MFV r277431: 5497 lock contention on arcs_mtx 2015-08-14 09:31:07 +00:00
range_tree.c
refcount.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
rrwlock.c MFV r284763: 5981 Deadlock in dmu_objset_find_dp 2015-08-12 19:10:29 +00:00
sa.c MFV r296518: 5027 zfs large block support (add copyright) 2016-03-08 17:51:09 +00:00
sha256.c Connect the SHA-512t256 and Skein hashing algorithms to ZFS 2016-05-31 04:12:14 +00:00
skein_zfs.c Connect the SHA-512t256 and Skein hashing algorithms to ZFS 2016-05-31 04:12:14 +00:00
spa_config.c MFV r299440: 6736 ZFS per-vdev ZAPs 2016-05-11 12:54:00 +00:00
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 r302993: 7104 increase indirect block size 2016-09-01 18:33:39 +00:00
spa.c MFV r304158: 2016-09-01 18:37:11 +00:00
space_map.c MFV r286704: 5960 zfs recv should prefetch indirect blocks 2015-08-12 22:41:06 +00:00
space_reftree.c MFV r289561: 6328 Fix cstyle errors in zfs codebase 2015-10-19 08:25:37 +00:00
THIRDPARTYLICENSE.lz4
THIRDPARTYLICENSE.lz4.descrip
trim_map.c
txg.c
uberblock.c
unique.c
vdev_cache.c
vdev_disk.c MFV r303077: 2016-09-03 08:42:12 +00:00
vdev_file.c MFV r296505: 6531 Provide mechanism to artificially limit disk performance 2016-03-08 17:27:13 +00:00
vdev_geom.c Fix uninitialized variable from r300881 2016-06-21 15:27:16 +00:00
vdev_label.c MFV r299440: 6736 ZFS per-vdev ZAPs 2016-05-11 12:54:00 +00:00
vdev_mirror.c Conditionalize code which defines sysctls per _KERNEL #ifdef guard 2016-07-31 06:34:49 +00:00
vdev_missing.c
vdev_queue.c Conditionalize code which defines sysctls per _KERNEL #ifdef guard 2016-07-31 06:34:49 +00:00
vdev_raidz.c MFV r296518: 5027 zfs large block support (add copyright) 2016-03-08 17:51:09 +00:00
vdev_root.c
vdev.c MFV r303077: 2016-09-03 08:42:12 +00:00
zap_leaf.c MFV r289561: 6328 Fix cstyle errors in zfs codebase 2015-10-19 08:25:37 +00:00
zap_micro.c MFV r302651: 7054 dmu_tx_hold_t should use refcount_t to track space 2016-09-01 14:38:25 +00:00
zap.c MFV r302651: 7054 dmu_tx_hold_t should use refcount_t to track space 2016-09-01 14:38:25 +00:00
zfeature.c MFV r289561: 6328 Fix cstyle errors in zfs codebase 2015-10-19 08:25:37 +00:00
zfs_acl.c zfs: honour and make use of vfs vnode locking protocol 2016-08-05 06:23:06 +00:00
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 fix .zfs-related cases in zfs_lookup that were broken by r303763 2016-08-06 11:02:07 +00:00
zfs_fm.c
zfs_fuid.c
zfs_ioctl.c MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT 2016-09-01 18:25:49 +00:00
zfs_log.c MFV r296518: 5027 zfs large block support (add copyright) 2016-03-08 17:51:09 +00:00
zfs_onexit.c
zfs_replay.c MFV r289561: 6328 Fix cstyle errors in zfs codebase 2015-10-19 08:25:37 +00:00
zfs_rlock.c
zfs_sa.c zfs: honour and make use of vfs vnode locking protocol 2016-08-05 06:23:06 +00:00
zfs_vfsops.c MFV r302660: 6314 buffer overflow in dsl_dataset_name 2016-09-01 15:08:27 +00:00
zfs_vnops.c fix a zfs cross-device rename crash introduced in r303763 2016-08-09 06:11:24 +00:00
zfs_znode.c zfs: honour and make use of vfs vnode locking protocol 2016-08-05 06:23:06 +00:00
zfs.conf
zil.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
zio_checksum.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
zio_compress.c MFV 286546: 2015-08-09 20:02:16 +00:00
zio_inject.c MFV r296505: 6531 Provide mechanism to artificially limit disk performance 2016-03-08 17:27:13 +00:00
zio.c MFV r302991: 6950 ARC should cache compressed data 2016-09-03 08:30:51 +00:00
zle.c
zrlock.c MFV r289561: 6328 Fix cstyle errors in zfs codebase 2015-10-19 08:25:37 +00:00
zvol.c Plug open count leak on zvol rename. 2016-03-30 16:54:18 +00:00