Go to file
Olaf Faaland d410c6d9fd Reimplement vdev_random_leaf and rename it
Rename it as mmp_random_leaf() since it is defined in mmp.c.

The earlier implementation could end up spinning forever if a pool had a
vdev marked writeable, none of whose children were writeable.  It also
did not guarantee that if a writeable leaf vdev existed, it would be
found.

Reimplement to recursively walk the device tree to select the leaf.  It
searches the entire tree, so that a return value of (NULL) indicates
there were no usable leaves in the pool; all were either not writeable
or had pending mmp writes.

It still chooses the starting child randomly at each level of the tree,
so if the pool's devices are healthy, the mmp writes go to random leaves
with an even distribution.  This was verified by testing using
zfs_multihost_history enabled.

Reviewed by: Thomas Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #6631 
Closes #6665
2017-09-22 14:29:26 -07:00
.github Correct cppcheck errors 2017-09-19 12:17:29 -07:00
cmd Remove FRU and LIBTOPO Support 2017-09-18 17:06:40 -07:00
config Linux 3.14 compat: IO acct, global_page_state, etc 2017-09-16 11:00:19 -07:00
contrib dracut: make module-setup.sh shebang explicit 2017-08-14 10:56:04 -07:00
etc Add man page reference to systemd units 2017-09-05 13:50:35 -07:00
include Correct cppcheck errors 2017-09-19 12:17:29 -07:00
lib Correct cppcheck errors 2017-09-19 12:17:29 -07:00
man Add mdoc style checker 2017-09-16 10:51:24 -07:00
module Reimplement vdev_random_leaf and rename it 2017-09-22 14:29:26 -07:00
rpm Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00
scripts Cleanup zloop working directory after each pass 2017-09-21 10:17:56 -07:00
tests ZTS fix slog_replay_volume.ksh failure 2017-09-19 10:09:37 -07:00
udev Fix spelling 2017-01-03 11:31:18 -06: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
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 Add configure option to enable gcov analysis 2017-09-15 10:24:13 -07:00
copy-builtin Allow c99 when building ZFS in the kernel tree 2017-03-27 12:31:15 -07:00
COPYRIGHT Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
Makefile.am Correct cppcheck errors 2017-09-19 12:17:29 -07: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 CONTRIBUTING information and templates 2016-12-09 12:48:12 -07:00
TEST Retire filebench testing 2017-06-01 06:24:28 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

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

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers. And it's native!

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.