Go to file
Serapheim Dimitropoulos 8d103d8856 OpenZFS 8604 - Simplify snapshots unmounting code
Authored by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Don Brady <don.brady@delphix.com>

Every time we want to unmount a snapshot (happens during snapshot
deletion or renaming) we unnecessarily iterate through all the
mountpoints in the VFS layer (see zfs_get_vfs).

The current patch completely gets rid of that code and changes
the approach while keeping the behavior of that code path the
same. Specifically, it puts a hold on the dataset/snapshot and
gets its vfs resource reference directly, instead of linearly
searching for it. If that reference exists we attempt to amount
it.

With the above change, it became obvious that the nvlist
manipulations that we do (add_boolean and add_nvlist) take a
significant amount of time ensuring uniqueness of every new
element even though they don't have too. Thus, we updated the
patch so those nvlists are not trying to enforce the uniqueness
of their elements.

A more complete analysis of the problem solved by this patch
can be found below:
https://sdimitro.github.io/post/snap-unmount-perf/

OpenZFS-issue: https://www.illumos.org/issues/8604
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/126118fb
2018-02-08 15:29:44 -08:00
.github Reduce codecov PR comments 2018-01-09 11:15:55 -08:00
cmd OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00
config Fix default libdir for Debian/Ubuntu 2018-02-05 20:42:52 -08:00
contrib OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00
etc OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00
include OpenZFS 8604 - Simplify snapshots unmounting code 2018-02-08 15:29:44 -08:00
lib Increase code coverage for Lua libraries 2018-02-08 15:29:38 -08:00
man OpenZFS 8600 - ZFS channel programs - snapshot 2018-02-08 15:29:24 -08:00
module OpenZFS 8604 - Simplify snapshots unmounting code 2018-02-08 15:29:44 -08:00
rpm Fix systemd_ RPM macros usage on Debian-based distributions 2018-02-02 13:50:42 -08:00
scripts OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00
tests Increase code coverage for Lua libraries 2018-02-08 15:29:38 -08: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
.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 OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08: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 Verify ZFS Test Suite scripts executability 2018-02-07 12:43:24 -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.