Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck_lfs The per-inode state 'id_entryno' is used by pa...



details:   https://anonhg.NetBSD.org/src/rev/a662e38e8580
branches:  trunk
changeset: 810963:a662e38e8580
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Oct 03 08:30:13 2015 +0000

description:
The per-inode state 'id_entryno' is used by pass1 for a block count,
so widen it to 'long long'. pass2 uses it for the number of entries in
a directory (IIUC) which does not need to be wider than int, but for
now let's not try to split into two fields. FUTURE...

diffstat:

 sbin/fsck_lfs/fsck.h  |  4 ++--
 sbin/fsck_lfs/pass1.c |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 2f3f6a75fa94 -r a662e38e8580 sbin/fsck_lfs/fsck.h
--- a/sbin/fsck_lfs/fsck.h      Sat Oct 03 08:30:02 2015 +0000
+++ b/sbin/fsck_lfs/fsck.h      Sat Oct 03 08:30:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.25 2015/10/03 08:30:02 dholland Exp $    */
+/* $NetBSD: fsck.h,v 1.26 2015/10/03 08:30:13 dholland Exp $    */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
        int id_numfrags;        /* number of frags contained in block */
        off_t id_filesize;      /* for DATA nodes, the size of the directory */
        int id_loc;             /* for DATA nodes, current location in dir */
-       int id_entryno;         /* for DATA nodes, current entry number */
+       long long id_entryno;   /* for DATA nodes, current entry number */
        LFS_DIRHEADER *id_dirp; /* for DATA nodes, ptr to current entry */
        const char *id_name;    /* for DATA nodes, name to find or enter */
        char id_type;           /* type of descriptor, DATA or ADDR */
diff -r 2f3f6a75fa94 -r a662e38e8580 sbin/fsck_lfs/pass1.c
--- a/sbin/fsck_lfs/pass1.c     Sat Oct 03 08:30:02 2015 +0000
+++ b/sbin/fsck_lfs/pass1.c     Sat Oct 03 08:30:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass1.c,v 1.44 2015/09/01 06:15:02 dholland Exp $   */
+/* $NetBSD: pass1.c,v 1.45 2015/10/03 08:30:13 dholland Exp $   */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -325,7 +325,7 @@
        idesc->id_number = inumber;
        (void) ckinode(VTOD(vp), idesc);
        if (lfs_dino_getblocks(fs, dp) != idesc->id_entryno) {
-               pwarn("INCORRECT BLOCK COUNT I=%llu (%ju SHOULD BE %d)",
+               pwarn("INCORRECT BLOCK COUNT I=%llu (%ju SHOULD BE %lld)",
                    (unsigned long long)inumber, lfs_dino_getblocks(fs, dp),
                    idesc->id_entryno);
                if (preen)



Home | Main Index | Thread Index | Old Index