svn commit: r213548 - in stable/8/sys/cddl: compat/opensolaris/sys
contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Fri Oct 8 07:31:33 UTC 2010
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);
}
More information about the svn-src-stable-8
mailing list