Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/lfs Fix obsolete comments in lfs_writeinode since re...



details:   https://anonhg.NetBSD.org/src/rev/40da5c382987
branches:  trunk
changeset: 499121:40da5c382987
user:      toshii <toshii%NetBSD.org@localhost>
date:      Sun Nov 12 02:13:51 2000 +0000

description:
Fix obsolete comments in lfs_writeinode since rev. 1.27.
New comments are mostly from perseant, with my additions.

diffstat:

 sys/ufs/lfs/lfs_segment.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 7bc27ac6ddef -r 40da5c382987 sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Sun Nov 12 00:59:05 2000 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Sun Nov 12 02:13:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_segment.c,v 1.59 2000/09/09 21:03:31 perseant Exp $        */
+/*     $NetBSD: lfs_segment.c,v 1.60 2000/11/12 02:13:51 toshii Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -818,11 +818,19 @@
        }
        
        /*
-        * No need to update segment usage if there was no former inode
-        * address or if the last inode address is in the current
-        * partial segment.
+        * Account the inode: it no longer belongs to its former segment,
+        * though it will not belong to the new segment until that segment
+        * is actually written.
         */
 #ifdef DEBUG
+       /*
+        * The inode's last address should not be in the current partial
+        * segment, except under exceptional circumstances (lfs_writevnodes
+        * had to start over, and in the meantime more blocks were written
+        * to a vnode).  Although the previous inode won't be accounted in
+        * su_nbytes until lfs_writeseg, this shouldn't be a problem as we
+        * have more data blocks in the current partial segment.
+        */
        if (daddr >= fs->lfs_lastpseg && daddr <= bp->b_blkno)
                printf("lfs_writeinode: last inode addr in current pseg "
                       "(ino %d daddr 0x%x)\n", ino, daddr);



Home | Main Index | Thread Index | Old Index