The following reply was made to PR kern/150544; it has been noted by GNATS.
From: Martin Matuska <m...@freebsd.org> To: jhell <jh...@dataix.net> Cc: Andriy Gapon <a...@freebsd.org>, "Vladislav V. Prodan" <univers...@ukr.net>, bug-follo...@freebsd.org Subject: Re: kern/150544: Panic, when viewing the list of ZFS snapshots Date: Tue, 14 Sep 2010 12:10:13 +0200 This is a multi-part message in MIME format. --------------020008070507050708080007 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: 8bit This new patch should be complete for this issue, my testing succeeds. Dòa 14. 9. 2010 11:16, jhell wrote / napísal(a): > On 09/14/2010 05:01, Andriy Gapon wrote: >> on 14/09/2010 11:54 jhell said the following: >>> Andriy, >>> I backed your patch out and applied Martin's. >>> >>> Martin, >>> >>> That patch did not work. core.txt.41 backtrace attached. >> >> It was kind of obvious (to me at least) that the Martin's patch alone won't >> work. >> I think I already explained what the problem is (zfsctl_mknode_shares >> passing >> zfsctl_ops_shares to gfs_dir_create with all vops in zfsctl_ops_shares >> being NULL). >> > > Yeah, It didn't seem like it was really that simple for just a lock > after I seen that message you posted before about that content/context. > > If that (.zfs/shares) is really not needed and we really have no way to > use it at the moment wouldn't be useful to go through and ifdef those > parts that effect that ? > --------------020008070507050708080007 Content-Type: text/plain; name="zfs_ctldir.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="zfs_ctldir.c.patch" Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c (revision 212358) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c (working copy) @@ -1101,8 +1101,9 @@ return (ENOTSUP); } if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { + vn_lock(ZTOV(dzp), LK_SHARED | LK_RETRY); error = VOP_READDIR(ZTOV(dzp), uiop, cr, eofp, ap->a_ncookies, ap->a_cookies); - VN_RELE(ZTOV(dzp)); + VN_URELE(ZTOV(dzp)); } else { *eofp = 1; error = ENOENT; @@ -1149,6 +1150,7 @@ NULL, NULL); sdp = vp->v_data; sdp->zc_cmtime = ((zfsctl_node_t *)pvp->v_data)->zc_cmtime; + VOP_UNLOCK(vp, 0); return (vp); } @@ -1176,8 +1178,9 @@ return (ENOTSUP); } if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { + vn_lock(ZTOV(dzp), LK_SHARED | LK_RETRY); error = VOP_GETATTR(ZTOV(dzp), vap, cr); - VN_RELE(ZTOV(dzp)); + VN_URELE(ZTOV(dzp)); } ZFS_EXIT(zfsvfs); return (error); @@ -1253,6 +1256,20 @@ .vop_fid = zfsctl_common_fid, }; +static struct vop_vector zfsctl_ops_shares = { + .vop_default = &default_vnodeops, + .vop_open = zfsctl_common_open, + .vop_close = zfsctl_common_close, + .vop_ioctl = VOP_EINVAL, + .vop_getattr = zfsctl_shares_getattr, + .vop_access = zfsctl_common_access, + .vop_readdir = zfsctl_shares_readdir, + .vop_lookup = zfsctl_shares_lookup, + .vop_inactive = gfs_vop_inactive, + .vop_reclaim = zfsctl_common_reclaim, + .vop_fid = zfsctl_shares_fid, +}; + /* * pvp is the GFS vnode '.zfs/snapshot'. * --------------020008070507050708080007-- _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"