Date: Thu, 21 Jul 2011 20:02:23 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r224252 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201107212002.p6LK2Nxp083738@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Thu Jul 21 20:02:22 2011 New Revision: 224252 URL: http://svn.freebsd.org/changeset/base/224252 Log: Bring the code more in-line with OpenSolaris source to ease future port. Reviewed by: pjd, mm Approved by: re (kib) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jul 21 20:01:51 2011 (r224251) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jul 21 20:02:22 2011 (r224252) @@ -2688,7 +2688,11 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i mutex_enter(&zp->z_lock); vap->va_type = IFTOVT(zp->z_mode); vap->va_mode = zp->z_mode & ~S_IFMT; -// vap->va_fsid = zp->z_zfsvfs->z_vfs->vfs_dev; +#ifdef sun + vap->va_fsid = zp->z_zfsvfs->z_vfs->vfs_dev; +#else + vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; +#endif vap->va_nodeid = zp->z_id; if ((vp->v_flag & VROOT) && zfs_show_ctldir(zp)) links = zp->z_links + 1; @@ -2696,9 +2700,12 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i links = zp->z_links; vap->va_nlink = MIN(links, UINT32_MAX); /* nlink_t limit! */ vap->va_size = zp->z_size; - vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; +#ifdef sun + vap->va_rdev = vp->v_rdev; +#else if (vp->v_type == VBLK || vp->v_type == VCHR) vap->va_rdev = zfs_cmpldev(rdev); +#endif vap->va_seq = zp->z_seq; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jul 21 20:01:51 2011 (r224251) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Jul 21 20:02:22 2011 (r224252) @@ -713,6 +713,10 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu break; #endif /* sun */ case VFIFO: +#ifdef sun + case VSOCK: + case VDOOR: +#endif /* sun */ vp->v_op = &zfs_fifoops; break; case VREG: @@ -721,6 +725,14 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu vp->v_op = &zfs_shareops; } break; +#ifdef sun + case VLNK: + vn_setops(vp, zfs_symvnodeops); + break; + default: + vn_setops(vp, zfs_evnodeops); + break; +#endif /* sun */ } if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107212002.p6LK2Nxp083738>