Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck_lfs make this work for big (ie. with indirect bloc...



details:   https://anonhg.NetBSD.org/src/rev/13a754f07ce1
branches:  trunk
changeset: 552790:13a754f07ce1
user:      yamt <yamt%NetBSD.org@localhost>
date:      Fri Oct 03 12:22:15 2003 +0000

description:
make this work for big (ie. with indirect blocks) directories
without spurious 'EXTRA ..' errors.

diffstat:

 sbin/fsck_lfs/inode.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r b0c1df6d6dad -r 13a754f07ce1 sbin/fsck_lfs/inode.c
--- a/sbin/fsck_lfs/inode.c     Fri Oct 03 10:29:05 2003 +0000
+++ b/sbin/fsck_lfs/inode.c     Fri Oct 03 12:22:15 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.21 2003/09/19 08:31:58 itojun Exp $     */
+/* $NetBSD: inode.c,v 1.22 2003/10/03 12:22:15 yamt Exp $       */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -187,7 +187,6 @@
                        ret = (*idesc->id_func) (idesc);
                } else
                        ret = dirscan(idesc);
-               idesc->id_lblkno = 0;
                if (ret & STOP)
                        return (ret);
        }
@@ -273,10 +272,15 @@
        for (ap = ((ufs_daddr_t *) bp->b_data); ap < aplim; ap++) {
                if (*ap) {
                        idesc->id_blkno = *ap;
-                       if (ilevel == 0)
+                       if (ilevel == 0) {
+                               /*
+                                * dirscan needs lblkno.
+                                */
+                               idesc->id_lblkno++;
                                n = (*func) (idesc);
-                       else
+                       } else {
                                n = iblock(idesc, ilevel, isize);
+                       }
                        if (n & STOP) {
                                if (diddirty)
                                        VOP_BWRITE(bp);



Home | Main Index | Thread Index | Old Index