Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs i_lfs_effnblks fixes. Put debugging printfs und...
details: https://anonhg.NetBSD.org/src/rev/d05b1b590bf8
branches: trunk
changeset: 494185:d05b1b590bf8
user: perseant <perseant%NetBSD.org@localhost>
date: Mon Jul 03 08:20:58 2000 +0000
description:
i_lfs_effnblks fixes. Put debugging printfs under #ifdef DEBUG_LFS.
diffstat:
sys/ufs/lfs/lfs_alloc.c | 3 ++-
sys/ufs/lfs/lfs_balloc.c | 3 ++-
sys/ufs/lfs/lfs_segment.c | 10 ++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
diffs (76 lines):
diff -r eba3c06c5ad5 -r d05b1b590bf8 sys/ufs/lfs/lfs_alloc.c
--- a/sys/ufs/lfs/lfs_alloc.c Mon Jul 03 07:16:04 2000 +0000
+++ b/sys/ufs/lfs/lfs_alloc.c Mon Jul 03 08:20:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_alloc.c,v 1.40 2000/06/30 20:45:39 fvdl Exp $ */
+/* $NetBSD: lfs_alloc.c,v 1.41 2000/07/03 08:20:58 perseant Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -300,6 +300,7 @@
ip->i_ffs_mode = 0;
ip->i_ffs_size = 0;
ip->i_ffs_blocks = 0;
+ ip->i_lfs_effnblks = 0;
++ump->um_lfs->lfs_uinodes;
}
diff -r eba3c06c5ad5 -r d05b1b590bf8 sys/ufs/lfs/lfs_balloc.c
--- a/sys/ufs/lfs/lfs_balloc.c Mon Jul 03 07:16:04 2000 +0000
+++ b/sys/ufs/lfs/lfs_balloc.c Mon Jul 03 08:20:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_balloc.c,v 1.21 2000/07/03 01:45:48 perseant Exp $ */
+/* $NetBSD: lfs_balloc.c,v 1.22 2000/07/03 08:20:58 perseant Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -389,6 +389,7 @@
fs->lfs_bfree -= bb;
ip->i_ffs_blocks += bb;
+ ip->i_lfs_effnblks += bb;
ip->i_flag |= IN_CHANGE | IN_UPDATE;
if((*bpp)->b_flags & B_LOCKED)
locked_queue_bytes += (nsize - osize);
diff -r eba3c06c5ad5 -r d05b1b590bf8 sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Mon Jul 03 07:16:04 2000 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Mon Jul 03 08:20:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.53 2000/07/03 01:45:52 perseant Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.54 2000/07/03 08:20:58 perseant Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -792,7 +792,7 @@
for (daddrp = cdp->di_db; daddrp < cdp->di_ib + NIADDR;
daddrp++) {
if (*daddrp == UNWRITTEN) {
-#ifdef DEBUG
+#ifdef DEBUG_LFS
printf("lfs_writeinode: wiping UNWRITTEN\n");
#endif
*daddrp = 0;
@@ -1373,10 +1373,12 @@
if(bp->b_lblkno < 0 && bp->b_vp != devvp && bp->b_vp &&
VTOI(bp->b_vp)->i_ffs_blocks !=
VTOI(bp->b_vp)->i_lfs_effnblks) {
+#ifdef DEBUG_LFS
printf("lfs_writeseg: cleansing ino %d (%d != %d)\n",
VTOI(bp->b_vp)->i_number,
VTOI(bp->b_vp)->i_lfs_effnblks,
VTOI(bp->b_vp)->i_ffs_blocks);
+#endif
/* Make a copy we'll make changes to */
newbp = lfs_newbuf(bp->b_vp, bp->b_lblkno,
bp->b_bcount);
@@ -1402,8 +1404,8 @@
daddrp < (daddr_t *)(newbp->b_data +
newbp->b_bcount); daddrp++) {
if (*daddrp == UNWRITTEN) {
-#ifdef DEBUG
- printf("lfs_segwrite: replacing UNWRITTEN\n");
+#ifdef DEBUG_LFS
+ printf("lfs_writeseg: replacing UNWRITTEN\n");
#endif
*daddrp = 0;
}
Home |
Main Index |
Thread Index |
Old Index