Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet Unmap pages when zfs_rezget() re-establi...
details: https://anonhg.NetBSD.org/src/rev/4fd04fa48f1e
branches: trunk
changeset: 842107:4fd04fa48f1e
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Jun 17 08:08:50 2019 +0000
description:
Unmap pages when zfs_rezget() re-establishes a znode with its dbufs.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c | 6 +++++-
external/cddl/osnet/sys/sys/zfs_context.h | 3 +--
2 files changed, 6 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 5597a86fb815 -r 4fd04fa48f1e external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Mon Jun 17 08:08:21 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Mon Jun 17 08:08:50 2019 +0000
@@ -1560,10 +1560,14 @@
zp->z_unlinked = (zp->z_links == 0);
zp->z_blksz = doi.doi_data_block_size;
+#ifdef __NetBSD__
+ mutex_enter(vp->v_interlock);
+ (void)VOP_PUTPAGES(vp, 0, 0, PGO_ALLPAGES|PGO_FREE|PGO_SYNCIO);
+#else
vn_pages_remove(vp, 0, 0);
+#endif
if (zp->z_size != size)
vnode_pager_setsize(vp, zp->z_size);
-
ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
return (0);
diff -r 5597a86fb815 -r 4fd04fa48f1e external/cddl/osnet/sys/sys/zfs_context.h
--- a/external/cddl/osnet/sys/sys/zfs_context.h Mon Jun 17 08:08:21 2019 +0000
+++ b/external/cddl/osnet/sys/sys/zfs_context.h Mon Jun 17 08:08:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zfs_context.h,v 1.21 2019/05/07 08:49:59 hannken Exp $ */
+/* $NetBSD: zfs_context.h,v 1.22 2019/06/17 08:08:51 hannken Exp $ */
/*
* CDDL HEADER START
@@ -777,7 +777,6 @@
void zfs_netbsd_setsize(vnode_t *, off_t);
#define vnode_pager_setsize(vp, size) zfs_netbsd_setsize(vp, size)
-#define vn_pages_remove(a, b, c)
#define getf fd_getfile
#define releasef fd_putfile
Home |
Main Index |
Thread Index |
Old Index