Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Corrections to part of rev 1.140. lfs_bmapv, not...
details: https://anonhg.NetBSD.org/src/rev/0a770fdfe156
branches: trunk
changeset: 772760:0a770fdfe156
user: perseant <perseant%NetBSD.org@localhost>
date: Sun Jan 15 04:42:04 2012 +0000
description:
Corrections to part of rev 1.140. lfs_bmapv, not lfs_markv, marks vnodes
LFSI_BMAP and recycles them. This greatly reduces the writing leakage
occurring when the filesystem has no space available for non-cleaning
writes.
diffstat:
sys/ufs/lfs/lfs_syscalls.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diffs (57 lines):
diff -r b9b4a5c39aee -r 0a770fdfe156 sys/ufs/lfs/lfs_syscalls.c
--- a/sys/ufs/lfs/lfs_syscalls.c Sun Jan 15 03:58:28 2012 +0000
+++ b/sys/ufs/lfs/lfs_syscalls.c Sun Jan 15 04:42:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_syscalls.c,v 1.140 2012/01/02 22:10:45 perseant Exp $ */
+/* $NetBSD: lfs_syscalls.c,v 1.141 2012/01/15 04:42:04 perseant Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007, 2008
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.140 2012/01/02 22:10:45 perseant Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.141 2012/01/15 04:42:04 perseant Exp $");
#ifndef LFS
# define LFS /* for prototypes in syscallargs.h */
@@ -291,17 +291,6 @@
*/
if (v_daddr != LFS_UNUSED_DADDR) {
lfs_vunref(vp);
- /*
- * If the vnode has LFSI_BMAP, it was
- * not found in the cache. Dump it so
- * we can reuse the vnode.
- * XXX If we knew what segment we were
- * XXX supposed to be looking for, we
- * XXX would be able to be more selective
- * XXX here.
- */
- if (ip->i_lfs_iflags & LFSI_BMAP)
- vrecycle(vp, NULL, NULL);
numrefed--;
}
@@ -719,6 +708,8 @@
*/
if (v_daddr != LFS_UNUSED_DADDR) {
lfs_vunref(vp);
+ if (VTOI(vp)->i_lfs_iflags & LFSI_BMAP)
+ vrecycle(vp, NULL, NULL);
numrefed--;
}
@@ -1139,6 +1130,11 @@
ufs_ihashins(ip);
mutex_exit(&ufs_hashlock);
+#ifdef notyet
+ /* Not found in the cache => this vnode was loaded only for cleaning. */
+ ip->i_lfs_iflags |= LFSI_BMAP;
+#endif
+
/*
* XXX
* This may not need to be here, logically it should go down with
Home |
Main Index |
Thread Index |
Old Index