Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outstanding .zfs/snapshot issues #3718

Closed
wants to merge 2 commits into from

Commits on Aug 31, 2015

  1. zfsctl: No need to sync ctldir inodes

    There's no metadata to write to disk for ctldir inodes. So we check if
    a inode belongs to the ctldir in zpl_commit_metadata, and returns
    immediately if it is.
    
    Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue openzfs#2797
    andrey-ve authored and behlendorf committed Aug 31, 2015
    Configuration menu
    Copy the full SHA
    c696dc9 View commit details
    Browse the repository at this point in the history
  2. Linux 3.18 compat: Snapshot auto-mounting

    Re-factor the .zfs/snapshot auto-mouting code to take in to account
    changes made to the upstream kernels.  And to lay the groundwork for
    enabling access to .zfs snapshots via NFS clients.  This patch makes
    the following core improvements.
    
    * All actively auto-mounted snapshots are now tracked in two global
    trees which are indexed by snapshot name and objset id respectively.
    This allows for fast lookups of any auto-mounted snapshot regardless
    without needing access to the parent dataset.
    
    * Snapshot entries are added to the tree in zfsctl_snapshot_mount().
    However, they are now removed from the tree in the context of the
    unmount process.  This eliminates the need complicated error logic
    in zfsctl_snapshot_unmount() to handle unmount failures.
    
    * References are now taken on the snapshot entries in the tree to
    ensure they always remain valid while a task is outstanding.
    
    * The MNT_SHRINKABLE flag is set on the snapshot vfsmount_t right
    after the auto-mount succeeds.  This allows to kernel to unmount
    idle auto-mounted snapshots if needed removing the need for the
    zfsctl_unmount_snapshots() function.
    
    * Snapshots in active use will not be automatically unmounted.  As
    long as at least one dentry is revalidated every zfs_expire_snapshot/2
    seconds the auto-unmount expiration timer will be extended.
    
    * Commit torvalds/linux@bafc9b7 caused snapshots auto-mounted by ZFS
    to be immediately unmounted when the dentry was revalidated.  This
    was a consequence of ZFS invaliding all snapdir dentries to ensure that
    negative dentries didn't mask new snapshots.  This patch modifies the
    behavior such that only negative dentries are invalidated.  This solves
    the issue and may result in a performance improvement.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes openzfs#3589
    Closes openzfs#3344
    Closes openzfs#3295
    Closes openzfs#3257
    Closes openzfs#3243
    Closes openzfs#3030
    Closes openzfs#2841
    behlendorf committed Aug 31, 2015
    Configuration menu
    Copy the full SHA
    0212d3c View commit details
    Browse the repository at this point in the history