Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/chfs chfs fixes
details: https://anonhg.NetBSD.org/src/rev/827ff6ee1d7b
branches: trunk
changeset: 780969:827ff6ee1d7b
user: ttoth <ttoth%NetBSD.org@localhost>
date: Mon Aug 13 13:12:51 2012 +0000
description:
chfs fixes
1. nodes are obsoleted only once during truncating a file
2. frags don't stay in pool_cache
diffstat:
sys/ufs/chfs/chfs_readinode.c | 3 ++-
sys/ufs/chfs/chfs_subr.c | 5 +++--
sys/ufs/chfs/chfs_vnode.c | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r bca61f3ca04e -r 827ff6ee1d7b sys/ufs/chfs/chfs_readinode.c
--- a/sys/ufs/chfs/chfs_readinode.c Mon Aug 13 12:37:18 2012 +0000
+++ b/sys/ufs/chfs/chfs_readinode.c Mon Aug 13 13:12:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_readinode.c,v 1.3 2012/08/10 09:26:58 ttoth Exp $ */
+/* $NetBSD: chfs_readinode.c,v 1.4 2012/08/13 13:12:51 ttoth Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -609,6 +609,7 @@
next = frag_next(fragtree, this);
if (this->node->nref == nref) {
rb_tree_remove_node(fragtree, this);
+ chfs_free_node_frag(this);
}
this = next;
}
diff -r bca61f3ca04e -r 827ff6ee1d7b sys/ufs/chfs/chfs_subr.c
--- a/sys/ufs/chfs/chfs_subr.c Mon Aug 13 12:37:18 2012 +0000
+++ b/sys/ufs/chfs/chfs_subr.c Mon Aug 13 13:12:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_subr.c,v 1.5 2012/08/10 09:26:58 ttoth Exp $ */
+/* $NetBSD: chfs_subr.c,v 1.6 2012/08/13 13:12:51 ttoth Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -299,7 +299,8 @@
// remove from the list
mutex_enter(&chmp->chm_lock_vnocache);
chfs_remove_frags_of_node(chmp, &ip->fragtree, fd->nref);
- chfs_remove_and_obsolete(chmp, ip->chvc, fd->nref, &ip->chvc->dnode);
+ // don't obsolete here, because setattr will obsolete this node
+ chfs_remove_node_from_list(chmp, ip->chvc, fd->nref, &ip->chvc->dnode);
mutex_exit(&chmp->chm_lock_vnocache);
blknum = lastfrag->ofs / PAGE_SIZE;
diff -r bca61f3ca04e -r 827ff6ee1d7b sys/ufs/chfs/chfs_vnode.c
--- a/sys/ufs/chfs/chfs_vnode.c Mon Aug 13 12:37:18 2012 +0000
+++ b/sys/ufs/chfs/chfs_vnode.c Mon Aug 13 13:12:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_vnode.c,v 1.6 2012/08/10 09:26:58 ttoth Exp $ */
+/* $NetBSD: chfs_vnode.c,v 1.7 2012/08/13 13:12:51 ttoth Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -83,7 +83,7 @@
if (chvc && ino != CHFS_ROOTINO) {
/* debug... */
- printf("readvnode; offset: %" PRIu32 ", lnr: %d\n",
+ dbg("offset: %" PRIu32 ", lnr: %d\n",
CHFS_GET_OFS(chvc->v->nref_offset), chvc->v->nref_lnr);
KASSERT((void *)chvc != (void *)chvc->v);
Home |
Main Index |
Thread Index |
Old Index