diff options
author | Serapheim Dimitropoulos <[email protected]> | 2018-02-08 09:32:45 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-02-08 15:29:44 -0800 |
commit | 8d103d88565efa90e545de57210c12edef77c938 (patch) | |
tree | 30ebd9d9ffb71c17ae6fd7e97fbf7007e8fb1147 /include/sys/arc.h | |
parent | fc5d4b6737b810be88d60ca5fa9de7e2fba4e26d (diff) |
OpenZFS 8604 - Simplify snapshots unmounting code
Authored by: Serapheim Dimitropoulos <[email protected]>
Reviewed by: Matt Ahrens <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Andy Stormont <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Ported-by: Don Brady <[email protected]>
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
Diffstat (limited to 'include/sys/arc.h')
0 files changed, 0 insertions, 0 deletions