From owner-svn-src-head@FreeBSD.ORG Thu Jul 21 20:02:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 799B0106567F; Thu, 21 Jul 2011 20:02:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4268FC15; Thu, 21 Jul 2011 20:02:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6LK2NeI083741; Thu, 21 Jul 2011 20:02:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6LK2Nxp083738; Thu, 21 Jul 2011 20:02:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201107212002.p6LK2Nxp083738@svn.freebsd.org> From: Xin LI Date: Thu, 21 Jul 2011 20:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224252 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2011 20:02:23 -0000 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);