From owner-svn-src-stable@FreeBSD.ORG Fri Oct 8 07:31:33 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5342B1065670; Fri, 8 Oct 2010 07:31:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 264BA8FC12; Fri, 8 Oct 2010 07:31:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o987VXQC082615; Fri, 8 Oct 2010 07:31:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o987VXkH082612; Fri, 8 Oct 2010 07:31:33 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201010080731.o987VXkH082612@svn.freebsd.org> From: Andriy Gapon Date: Fri, 8 Oct 2010 07:31:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213548 - in stable/8/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2010 07:31:33 -0000 Author: avg Date: Fri Oct 8 07:31:32 2010 New Revision: 213548 URL: http://svn.freebsd.org/changeset/base/213548 Log: MFC r212657: zfs vn_has_cached_data: take into account v_object->cache != NULL Modified: stable/8/sys/cddl/compat/opensolaris/sys/vnode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/sys/vnode.h Fri Oct 8 07:29:26 2010 (r213547) +++ stable/8/sys/cddl/compat/opensolaris/sys/vnode.h Fri Oct 8 07:31:32 2010 (r213548) @@ -69,7 +69,9 @@ vn_is_readonly(vnode_t *vp) #define vn_vfsunlock(vp) do { } while (0) #define vn_ismntpt(vp) ((vp)->v_type == VDIR && (vp)->v_mountedhere != NULL) #define vn_mountedvfs(vp) ((vp)->v_mountedhere) -#define vn_has_cached_data(vp) ((vp)->v_object != NULL && (vp)->v_object->resident_page_count > 0) +#define vn_has_cached_data(vp) \ + ((vp)->v_object != NULL && ((vp)->v_object->resident_page_count > 0 \ + || (vp)->v_object->cache != NULL)) #define vn_exists(vp) do { } while (0) #define vn_invalid(vp) do { } while (0) #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 8 07:29:26 2010 (r213547) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Oct 8 07:31:32 2010 (r213548) @@ -931,17 +931,7 @@ again: uioskip(uio, tx_bytes); } - /* - * XXXPJD: There are some cases (triggered by fsx) where - * vn_has_cached_data(vp) returns false when it should - * return true. This should be investigated. - */ -#if 0 - if (tx_bytes && vn_has_cached_data(vp)) -#else - if (tx_bytes && vp->v_object != NULL) -#endif - { + if (tx_bytes && vn_has_cached_data(vp)) { update_pages(vp, woff, tx_bytes, zfsvfs->z_os, zp->z_id, uio->uio_segflg, tx); }