]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
8604 Avoid unnecessary work search in VFS when unmounting snapshots
authorAndriy Gapon <avg@FreeBSD.org>
Wed, 20 Sep 2017 07:28:18 +0000 (07:28 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Wed, 20 Sep 2017 07:28:18 +0000 (07:28 +0000)
commit67effa3d26d4a6fbf1607e7150df05c159538060
tree8802f3c15bafed41055cc0f2226fa744eec4ebad
parentde90fd216825a6aa001663d4e64eab0374b15933
8604 Avoid unnecessary work search in VFS when unmounting snapshots

illumos/illumos-gate@ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1
https://github.com/illumos/illumos-gate/commit/ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1

https://www.illumos.org/issues/8604
  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).
  Ideally we would just put a hold on the snapshot and access its respective VFS
  resource directly.
  gwilson_snap_unmount.svg - Flamegraph indicating the issue discussed (138 KB)
  Serapheim Dimitropoulos, 2017-09-14 06:36 PM

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>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
uts/common/fs/zfs/dsl_destroy.c
uts/common/fs/zfs/sys/zfs_ioctl.h
uts/common/fs/zfs/zfs_ioctl.c