From owner-cvs-src-old@FreeBSD.ORG Wed Sep 15 11:06:02 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B48F41065672 for ; Wed, 15 Sep 2010 11:06:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A2E558FC18 for ; Wed, 15 Sep 2010 11:06:02 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o8FB62Ze067971 for ; Wed, 15 Sep 2010 11:06:02 GMT (envelope-from avg@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o8FB62kr067970 for cvs-src-old@freebsd.org; Wed, 15 Sep 2010 11:06:02 GMT (envelope-from avg@repoman.freebsd.org) Message-Id: <201009151106.o8FB62kr067970@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to avg@repoman.freebsd.org using -f From: Andriy Gapon Date: Wed, 15 Sep 2010 11:05:41 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/cddl/compat/opensolaris/sys vnode.h src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_vnops.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 11:06:02 -0000 avg 2010-09-15 11:05:41 UTC FreeBSD src repository Modified files: sys/cddl/compat/opensolaris/sys vnode.h sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_vnops.c Log: SVN rev 212657 on 2010-09-15 11:05:41Z by avg zfs vn_has_cached_data: take into account v_object->cache != NULL This mirrors code in tmpfs. This changge shouldn't affect much read path, it may cause unnecessary vm_page_lookup calls in the case where v_object has no active or inactive pages but has some cache pages. I believe this situation to be non-essential. In write path this change should allow us to properly detect the above case and free a cache page when we write to a range that corresponds to it. If this situation is undetected then we could have a discrepancy between data in page cache and in ARC or on disk. This change allows us to re-enable vn_has_cached_data() check in zfs_write. NOTE: strictly speaking resident_page_count and cache fields of v_object should be exmined under VM_OBJECT_LOCK, but for this particular usage we may get away with it. Discussed with: alc, kib Approved by: pjd Tested with: tools/regression/fsx MFC after: 3 weeks Revision Changes Path 1.16 +3 -1 src/sys/cddl/compat/opensolaris/sys/vnode.h 1.75 +1 -11 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c