Go to file
George Wilson c10d37dd9f zfs initialize performance enhancements
PROBLEM
========

When invoking "zpool initialize" on a pool the command will
create a thread to initialize each disk. Unfortunately, it does
this serially across many transaction groups which can result
in commands taking a long time to return to the user and may
appear hung. The same thing is true when trying to suspend/cancel
the operation.

SOLUTION
=========

This change refactors the way we invoke the initialize interface
to ensure we can start or stop the intialization in just a few
transaction groups.

When stopping or cancelling a vdev initialization perform it
in two phases.  First signal each vdev initialization thread
that it should exit, then after all threads have been signaled
wait for them to exit.

On a pool with 40 leaf vdevs this reduces the vdev initialize
stop/cancel time from ~10 minutes to under a second.  The reason
for this is spa_vdev_initialize() no longer needs to wait on
multiple full TXGs per leaf vdev being stopped.

This commit additionally adds some missing checks for the passed
"initialize_vdevs" input nvlist.  The contents of the user provided
input "initialize_vdevs" nvlist must be validated to ensure all
values are uint64s.  This is done in zfs_ioc_pool_initialize() in
order to keep all of these checks in a single location.

Updated the innvl and outnvl comments to match the formatting used
for all other new sytle ioctls.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Wilson <george.wilson@delphix.com>
Closes #8230
2019-01-07 11:03:08 -08:00
.github Advise users to retain issue/PR templates 2018-10-17 10:25:38 -07:00
cmd zfs initialize performance enhancements 2019-01-07 11:03:08 -08:00
config pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
contrib pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
etc Add enclosure_symlinks option to vdev_id 2018-12-14 17:27:49 -08:00
include zfs initialize performance enhancements 2019-01-07 11:03:08 -08:00
lib OpenZFS 9102 - zfs should be able to initialize storage devices 2019-01-07 10:37:26 -08:00
man OpenZFS 9102 - zfs should be able to initialize storage devices 2019-01-07 10:37:26 -08:00
module zfs initialize performance enhancements 2019-01-07 11:03:08 -08:00
rpm pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08:00
scripts arc_summary: consolidate test case 2019-01-06 10:39:41 -08:00
tests OpenZFS 9102 - zfs should be able to initialize storage devices 2019-01-07 10:37:26 -08:00
udev Add enclosure_symlinks option to vdev_id 2018-12-14 17:27:49 -08:00
.gitignore pyzfs: python3 support (build system) 2019-01-06 10:39:41 -08: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 Update build system and packaging 2018-05-29 16:00:33 -07:00
autogen.sh Cause autogen.sh to fail if autoreconf fails 2018-07-06 09:27:37 -07:00
configure.ac OpenZFS 9102 - zfs should be able to initialize storage devices 2019-01-07 10:37:26 -08:00
copy-builtin Allow copy-builtin to work with modified sources 2018-10-17 12:06:05 -07:00
COPYRIGHT Update build system and packaging 2018-05-29 16:00:33 -07:00
LICENSE Update build system and packaging 2018-05-29 16:00:33 -07:00
Makefile.am Linux does not HAVE_DNLC 2018-10-17 10:30:08 -07:00
META Tag 0.8.0-rc2 2018-11-12 11:57:15 -08:00
NEWS Add NEWS file 2018-09-18 12:03:47 -07:00
NOTICE Update build system and packaging 2018-05-29 16:00:33 -07:00
README.md Explicitly state supported Linux versions 2018-05-30 20:11:19 -07:00
TEST Update build system and packaging 2018-05-29 16:00:33 -07: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.

Release

ZFS on Linux is released under a CDDL license.
For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197

Supported Kernels

  • The META file contains the officially recognized supported kernel versions.