Project

General

Profile

Bug #4953

zfs rename <snapshot> need not involve libshare

Added by Matthew Ahrens about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2014-07-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

As is well known, libshare is extremely slow. We should avoid
using it whenever possible. When renaming a snapshot, there is no need to
unshare anything, so we should not involve libshare.

Note: this only applies to renaming snapshots that have clones -- it's the
clone that we are (unnecessarily) unmounting and then remounting.

libc.so.1`ioctl+0x15
libzfs.so.1`zfs_iter_filesystems+0xb4
libshare.so.1`get_one_filesystem+0x3d
libzfs.so.1`zfs_iter_root+0x6d
libshare.so.1`get_all_filesystems+0x57
libshare.so.1`sa_get_zfs_shares+0x78
libshare.so.1`sa_init+0x50a
libzfs.so.1`zfs_init_libshare+0x83
libzfs.so.1`unshare_one+0x2f
libzfs.so.1`zfs_unshare_proto+0xc4
libzfs.so.1`zfs_unmount+0x79
libzfs.so.1`changelist_prefix+0x8c
libzfs.so.1`zfs_rename+0x52f
zfs`zfs_do_rename+0x223
zfs`main+0x212
zfs`_start+0x83

History

#1

Updated by Electric Monk about 5 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 33cde0d0c27645bc9ec94c4d2955193c3dd4027c

commit  33cde0d0c27645bc9ec94c4d2955193c3dd4027c
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2014-07-08T04:12:40.000Z

    4953 zfs rename <snapshot> need not involve libshare
    4954 "zfs create" need not involve libshare if we are not sharing
    4955 libshare's get_zfs_dataset need not sort the datasets
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF