diff options
author | pjd <pjd@FreeBSD.org> | 2009-09-14 21:10:40 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2009-09-14 21:10:40 +0000 |
commit | 8e84db0e0c9c2577673cc926d5ecfced70cd9085 (patch) | |
tree | b626f33943d7daac630dd97659f636c6a447fc73 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c | |
parent | 22f6c80f945e140f85edeba0cd1cda5926cf6e4c (diff) | |
download | FreeBSD-src-8e84db0e0c9c2577673cc926d5ecfced70cd9085.zip FreeBSD-src-8e84db0e0c9c2577673cc926d5ecfced70cd9085.tar.gz |
- Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular
df(1) and mount(8) output. This is a bit smilar to OpenSolaris and follows
ZFS route of not listing snapshots by default with 'zfs list' command.
- Add UPDATING entry to note that ZFS snapshots are no longer visible in
mount(8) and df(1) output by default.
Reviewed by: kib
MFC after: 3 days
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c index e845a99..0b034f6 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c @@ -880,17 +880,9 @@ domount: mountpoint = kmem_alloc(mountpoint_len, KM_SLEEP); (void) snprintf(mountpoint, mountpoint_len, "%s/.zfs/snapshot/%s", dvp->v_vfsp->mnt_stat.f_mntonname, nm); - err = domount(curthread, *vpp, "zfs", mountpoint, snapname, 0); + err = mount_snapshot(curthread, vpp, "zfs", mountpoint, snapname, 0); kmem_free(mountpoint, mountpoint_len); if (err == 0) { - vnode_t *mvp; - - ASSERT((*vpp)->v_mountedhere != NULL); - err = VFS_ROOT((*vpp)->v_mountedhere, LK_EXCLUSIVE, &mvp); - ASSERT(err == 0); - VN_RELE(*vpp); - *vpp = mvp; - /* * Fix up the root vnode mounted on .zfs/snapshot/<snapname>. * @@ -902,14 +894,6 @@ domount: VTOZ(*vpp)->z_zfsvfs->z_parent = zfsvfs; } mutex_exit(&sdp->sd_lock); - /* - * If we had an error, drop our hold on the vnode and - * zfsctl_snapshot_inactive() will clean up. - */ - if (err) { - VN_RELE(*vpp); - *vpp = NULL; - } ZFS_EXIT(zfsvfs); return (err); } |