mirror_zfs/include/sys
ilbsmart 98bb45e27a deadlock between mm_sem and tx assign in zfs_write() and page fault
The bug time sequence:
1. thread #1, `zfs_write` assign a txg "n".
2. In a same process, thread #2, mmap page fault (which means the
   `mm_sem` is hold) occurred, `zfs_dirty_inode` open a txg failed,
   and wait previous txg "n" completed.
3. thread #1 call `uiomove` to write, however page fault is occurred
   in `uiomove`, which means it need `mm_sem`, but `mm_sem` is hold by
   thread #2, so it stuck and can't complete,  then txg "n" will
   not complete.

So thread #1 and thread #2 are deadlocked.

Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Grady Wong <grady.w@xtaotech.com>
Closes #7939
2019-02-22 09:47:34 -08:00
..
crypto OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R 2016-10-03 14:51:15 -07:00
fm OpenZFS 6939 - add sysevents to zfs core for commands 2017-07-12 21:28:13 -07:00
fs Report pool suspended due to MMP 2018-05-07 17:19:56 -07:00
sysevent Emit history events for 'zpool create' 2017-12-04 17:21:03 -08:00
abd.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
arc_impl.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
arc.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
avl_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
avl.h Performance optimization of AVL tree comparator functions 2016-08-31 14:35:34 -07:00
blkptr.h OpenZFS 8067 - zdb should be able to dump literal embedded block pointer 2017-07-07 11:28:01 -07:00
bplist.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
bpobj.h Illumos 5810 - zdb should print details of bpobj 2015-05-11 15:10:24 -07:00
bptree.h Illumos 4914 - zfs on-disk bookmark structure should be named *_phys_t 2014-08-06 14:48:41 -07:00
bqueue.h Illumos 5960, 5925 2016-01-08 15:08:19 -08:00
dbuf.h OpenZFS 9577 - remove zfs_dbuf_evict_key tsd 2019-02-22 09:47:34 -08:00
ddt.h DLPX-44812 integrate EP-220 large memory scalability 2016-11-29 14:34:27 -08:00
dmu_impl.h Fix race in dnode_check_slots_free() 2018-11-08 14:38:28 -08:00
dmu_objset.h Linux 4.18 compat: inode timespec -> timespec64 2018-07-06 02:46:51 -07:00
dmu_send.h Free objects when receiving full stream as clone 2017-10-16 10:57:55 -07:00
dmu_traverse.h OpenZFS 2605, 6980, 6902 2016-06-28 13:47:02 -07:00
dmu_tx.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
dmu_zfetch.h OpenZFS 6322 - ZFS indirect block predictive prefetch 2016-08-30 14:26:55 -07:00
dmu.h OpenZFS 8997 - ztest assertion failure in zil_lwb_write_issue 2018-07-06 02:46:51 -07:00
dnode.h OpenZFS 9577 - remove zfs_dbuf_evict_key tsd 2019-02-22 09:47:34 -08:00
dsl_bookmark.h Illumos 4368, 4369. 2014-07-29 10:55:29 -07:00
dsl_dataset.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
dsl_deadlist.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
dsl_deleg.h Add support for user/group dnode accounting & quota 2016-10-07 09:45:13 -07:00
dsl_destroy.h Illumos #3888 2013-11-04 11:18:14 -08:00
dsl_dir.h Linux 4.18 compat: inode timespec -> timespec64 2018-07-06 02:46:51 -07:00
dsl_pool.h Multi-modifier protection (MMP) 2017-07-13 13:54:00 -04:00
dsl_prop.h Illumos 6171 - dsl_prop_unregister() slows down dataset eviction. 2016-01-12 10:53:12 -08:00
dsl_scan.h Implemented zpool scrub pause/resume 2017-07-06 22:16:13 -07:00
dsl_synctask.h Illumos 4951 - ZFS administrative commands should use reserved space 2015-05-04 09:41:10 -07:00
dsl_userhold.h Illumos #3740 2013-11-04 11:17:48 -08:00
edonr.h OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R 2016-10-03 14:51:15 -07:00
efi_partition.h Fix spelling 2017-01-03 11:31:18 -06:00
Makefile.am Multi-modifier protection (MMP) 2017-07-13 13:54:00 -04:00
metaslab_impl.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
metaslab.h OpenZFS 7303 - dynamic metaslab selection 2017-01-12 11:52:56 -08:00
mmp.h Record skipped MMP writes in multihost_history 2018-05-07 17:19:56 -07:00
mntent.h Make zfs mount according to relatime config in dataset 2016-04-05 18:55:59 -07:00
multilist.h OpenZFS 7968 - multi-threaded spa_sync() 2017-03-20 18:36:00 -07:00
nvpair_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
nvpair.h Replace __va_list with va_list 2014-08-13 10:35:00 -07:00
pathname.h Add pn_alloc()/pn_free() functions 2016-04-21 09:49:25 -07:00
policy.h Add zfs allow and zfs unallow support 2016-06-07 09:16:52 -07:00
range_tree.h Illumos #4374 2014-07-30 09:20:35 -07:00
refcount.h Prefix all refcount functions with zfs_ 2018-11-08 14:38:28 -08:00
rrwlock.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
sa_impl.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
sa.h Remove unused sa_update_from_cb() 2016-12-01 16:39:06 -07:00
sdt.h Add line info and SET_ERROR() to ZFS debug log 2017-07-25 23:09:48 -07:00
sha2.h OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R 2016-10-03 14:51:15 -07:00
skein.h OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R 2016-10-03 14:51:15 -07:00
spa_boot.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
spa_checksum.h Implementation of AVX2 optimized Fletcher-4 2016-06-02 14:30:51 -07:00
spa_impl.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
spa.h Add pool state /proc entry, "SUSPENDED" pools 2018-07-06 02:46:51 -07:00
space_map.h Illumos 5164-5165 - space map fixes 2014-10-23 15:30:32 -07:00
space_reftree.h Illumos #4101, #4102, #4103, #4105, #4106 2014-07-22 09:39:16 -07:00
sysevent.h OpenZFS 6939 - add sysevents to zfs core for commands 2017-07-12 21:28:13 -07:00
trace_acl.h Linux 4.16 compat: inode_set_iversion() 2018-03-14 16:10:36 -07:00
trace_arc.h Fix build-it compilation regression 2017-01-24 08:50:15 -08:00
trace_common.h OpenZFS 6531 - Provide mechanism to artificially limit disk performance 2016-05-26 10:11:51 -07:00
trace_dbgmsg.h Add line info and SET_ERROR() to ZFS debug log 2017-07-25 23:09:48 -07:00
trace_dbuf.h Prefix all refcount functions with zfs_ 2018-11-08 14:38:28 -08:00
trace_dmu.h tx_waited -> tx_dirty_delayed in trace_dmu.h 2018-09-13 10:12:22 -07:00
trace_dnode.h Fix build-it compilation regression 2017-01-24 08:50:15 -08:00
trace_multilist.h Fix build-it compilation regression 2017-01-24 08:50:15 -08:00
trace_txg.h Fix build-it compilation regression 2017-01-24 08:50:15 -08:00
trace_zil.h OpenZFS 7578 - Fix/improve some aspects of ZIL writing 2017-06-09 09:15:37 -07:00
trace_zio.h Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
trace_zrlock.h Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
trace.h Remove duplicate typedefs from trace.h 2015-01-06 16:53:24 -08:00
txg_impl.h Fix spelling 2017-01-03 11:31:18 -06:00
txg.h OpenZFS 8063 - verify that we do not attempt to access inactive txg 2017-05-10 13:52:22 -04:00
u8_textprep_data.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
u8_textprep.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
uberblock_impl.h OpenZFS 8491 - uberblock on-disk padding to reserve space for smoothly merging zpool checkpoint & MMP in ZFS 2017-07-24 13:47:51 -04:00
uberblock.h Multi-modifier protection (MMP) 2017-07-13 13:54:00 -04:00
uio_impl.h deadlock between mm_sem and tx assign in zfs_write() and page fault 2019-02-22 09:47:34 -08:00
unique.h Illumos #3742 2013-11-04 10:55:25 -08:00
uuid.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
vdev_disk.h Revert "zpool reopen should detect expanded devices" 2018-09-13 10:11:42 -07:00
vdev_file.h Use a dedicated taskq for vdev_file 2016-12-21 10:47:15 -08:00
vdev_impl.h Change checksum & IO delay ratelimit values 2018-03-14 16:10:38 -07:00
vdev_raidz_impl.h Revert raidz_map and _col structure types 2018-01-30 10:27:31 -06:00
vdev_raidz.h Use cstyle -cpP in make cstyle check 2016-12-12 10:46:26 -08:00
vdev.h vdev_mirror: load balancing fixes 2018-01-30 10:27:30 -06:00
xvattr.h Linux 4.18 compat: inode timespec -> timespec64 2018-07-06 02:46:51 -07:00
zap_impl.h OpenZFS 7793 - ztest fails assertion in dmu_tx_willuse_space 2017-03-07 09:51:59 -08:00
zap_leaf.h Fix ENOSPC in "Handle zap_add() failures in ..." 2018-07-06 02:46:51 -07:00
zap.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
zfeature.h Revert "zhack: Add 'feature disable' command" 2016-05-17 11:52:07 -07:00
zfs_acl.h Rename zfs_sb_t -> zfsvfs_t 2017-03-10 09:51:33 -08:00
zfs_context.h Linux 4.18 compat: inode timespec -> timespec64 2018-07-06 02:46:51 -07:00
zfs_ctldir.h Rename zfs_sb_t -> zfsvfs_t 2017-03-10 09:51:33 -08:00
zfs_debug.h Add line info and SET_ERROR() to ZFS debug log 2017-07-25 23:09:48 -07:00
zfs_delay.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
zfs_dir.h Rename zfs_sb_t -> zfsvfs_t 2017-03-10 09:51:33 -08:00
zfs_fuid.h Rename zfs_sb_t -> zfsvfs_t 2017-03-10 09:51:33 -08:00
zfs_ioctl.h Inject zinject(8) a percentage amount of dev errs 2017-06-16 17:21:11 -07:00
zfs_onexit.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zfs_ratelimit.h Change checksum & IO delay ratelimit values 2018-03-14 16:10:38 -07:00
zfs_rlock.h Rename zfs_sb_t -> zfsvfs_t 2017-03-10 09:51:33 -08:00
zfs_sa.h Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
zfs_stat.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
zfs_vfsops.h Fix zpl_mount() deadlock 2018-07-06 02:46:51 -07:00
zfs_vnops.h RHEL 7.5 compat: FMODE_KABI_ITERATE 2018-05-07 17:19:57 -07:00
zfs_znode.h Linux 4.19-rc3+ compat: Remove refcount_t compat 2018-11-08 14:38:28 -08:00
zil_impl.h OpenZFS 7578 - Fix/improve some aspects of ZIL writing 2017-06-09 09:15:37 -07:00
zil.h Preserve itx alloc size for zio_data_buf_free() 2017-12-04 17:21:39 -08:00
zio_checksum.h Remove dependency on linear ABD 2017-03-29 12:24:51 -07:00
zio_compress.h DLPX-44812 integrate EP-220 large memory scalability 2016-11-29 14:34:27 -08:00
zio_impl.h Compile zio.h and zio_impl.h mutual include 2016-12-01 16:36:25 -07:00
zio_priority.h Add -lhHpw options to "zpool iostat" for avg latency, histograms, & queues 2016-05-12 12:36:32 -07:00
zio.h Reduce taskq and context-switch cost of zio pipe 2018-11-08 14:38:28 -08:00
zpl.h Linux 4.18 compat: inode timespec -> timespec64 2018-07-06 02:46:51 -07:00
zrlock.h OpenZFS 6328 - Fix cstyle errors in zfs codebase 2017-01-12 09:42:11 -08:00
zvol.h Add port of FreeBSD 'volmode' property 2017-07-12 13:05:37 -07:00