FreeBSD src
Go to file
LOLi 77d8a0f1a4 Fix hung z_zvol tasks during 'zfs receive'
During a receive operation zvol_create_minors_impl() can wait
needlessly for the prefetch thread because both share the same tasks
queue.  This results in hung tasks:

<3>INFO: task z_zvol:5541 blocked for more than 120 seconds.
<3>      Tainted: P           O  3.16.0-4-amd64
<3>"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

The first z_zvol:5541 (zvol_task_cb) is waiting for the long running
traverse_prefetch_thread:260

root@linux:~# cat /proc/spl/taskq
taskq                       act  nthr  spwn  maxt   pri  mina
spl_system_taskq/0            1     2     0    64   100     1
	active: [260]traverse_prefetch_thread [zfs](0xffff88003347ae40)
	wait: 5541
spl_delay_taskq/0             0     1     0     4   100     1
	delay: spa_deadman [zfs](0xffff880039924000)
z_zvol/1                      1     1     0     1   120     1
	active: [5541]zvol_task_cb [zfs](0xffff88001fde6400)
	pend: zvol_task_cb [zfs](0xffff88001fde6800)

This change adds a dedicated, per-pool, prefetch taskq to prevent the
traverse code from monopolizing the global (and limited) system_taskq by
inappropriately scheduling long running tasks on it.

Reviewed-by: Albert Lee <trisk@forkgnu.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6330 
Closes #6890 
Closes #7343
2018-03-30 12:10:01 -07:00
.github Reduce codecov PR comments 2018-01-09 11:15:55 -08:00
cmd Add JSON output support to channel programs 2018-03-19 12:40:58 -07:00
config Fix mmap / libaio deadlock 2018-03-28 10:19:22 -07:00
contrib modprobe zfs during dracut mount 2018-03-22 10:14:29 -07:00
etc zfs-functions: skip lines where mntpnt is 'none' 2018-03-30 12:05:24 -07:00
include Fix hung z_zvol tasks during 'zfs receive' 2018-03-30 12:10:01 -07:00
lib Add support for nvme based devids 2018-03-29 17:43:25 -07:00
man Clarify zpool actions for an intent log device 2018-03-22 15:12:08 -07:00
module Fix hung z_zvol tasks during 'zfs receive' 2018-03-30 12:10:01 -07:00
rpm Fix mmap / libaio deadlock 2018-03-28 10:19:22 -07:00
scripts Fix free memory calculation on v3.14+ 2018-02-23 08:50:06 -08:00
tests OpenZFS 9164 - assert: newds == os->os_dsl_dataset 2018-03-30 12:00:40 -07:00
udev Add kernel module auto-loading 2018-03-13 10:45:55 -07:00
.gitignore Add configure option to enable gcov analysis 2017-09-15 10:24:13 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
.travis.yml Add .travis.yml 2017-11-13 09:18:18 -08:00
AUTHORS Add a missing > to AUTHORS 2014-09-02 14:18:53 -07:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac Fix mmap / libaio deadlock 2018-03-28 10:19:22 -07:00
copy-builtin Fix copy-builtin to work with ASAN patch 2018-01-12 09:39:36 -08:00
COPYRIGHT Encryption patch follow-up 2017-10-11 16:54:48 -04:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
Makefile.am Allow make checkstyle and paxscript in build dir 2018-02-21 12:35:59 -08:00
META Tag zfs-0.7.0 2017-07-26 10:13:25 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Add scan.coverity.com badge to README 2017-10-30 16:21:24 -07:00
TEST Refresh TEST file to include new variables 2017-11-08 11:09:30 -08:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

img

ZFS on Linux is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community.

codecov coverity

Official Resources

Installation

Full documentation for installing ZoL on your favorite Linux distribution can be found at our site.

Contribute & Develop

We have a separate document with contribution guidelines.