Date: Sat, 13 Nov 2010 21:09:18 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215260 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201011132109.oADL9Iuj059902@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mm Date: Sat Nov 13 21:09:18 2010 New Revision: 215260 URL: http://svn.freebsd.org/changeset/base/215260 Log: Disable VFS_HOLD placed on mnt_vnodecovered during the mount of a snapshot and VFS_RELE on a non-existing hold on snapshot parent's z_vfs. This disables the changes from OpenSolaris onnv-revision 9234:bffdc4fc05c4 (bug IDs: 6792139, 6794830) - not applicable to FreeBSD. This fixes the process hang if umounting a manually mounted snapshot. Reported by: Alexander Zagrebin <alexz@visp.ru> Approved by: delphij (mentor) MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Nov 13 21:03:19 2010 (r215259) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Nov 13 21:09:18 2010 (r215260) @@ -1218,12 +1218,14 @@ zfs_mount(vfs_t *vfsp) error = zfs_domount(vfsp, osname); PICKUP_GIANT(); +#ifdef sun /* * Add an extra VFS_HOLD on our parent vfs so that it can't * disappear due to a forced unmount. */ if (error == 0 && ((zfsvfs_t *)vfsp->vfs_data)->z_issnap) VFS_HOLD(mvp->v_vfsp); +#endif /* sun */ out: return (error); @@ -1766,12 +1768,14 @@ zfs_freevfs(vfs_t *vfsp) { zfsvfs_t *zfsvfs = vfsp->vfs_data; +#ifdef sun /* * If this is a snapshot, we have an extra VFS_HOLD on our parent * from zfs_mount(). Release it here. */ if (zfsvfs->z_issnap) VFS_RELE(zfsvfs->z_parent->z_vfs); +#endif /* sun */ zfsvfs_free(zfsvfs);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011132109.oADL9Iuj059902>