ext2 ino/dirent count not being updated

From: Paul Gortmaker (p_gortmaker@yahoo.com)
Date: Tue Aug 08 2000 - 03:21:03 EST


It appears that somewhere the inode/dirent counts aren't being updated
in 2.4.0-testN (N from 1 up to and including 5 anyway). You won't notice
unless you explicitly e2fsck or boot a 2.2.x kernel - I noticed when
switching between 2.2 and 2.4 as the simplistic mount check in 2.2
picks up the wrong inode count (but not the wrong dirent count).

Happened three times here (log of last 2 appended) - on a hunch it
might be related to generation of hard links as this disk has been
used exclusively for 2.4.0-testN-preM trees created from cp -a --link
of 2.4.0-test1 plus (pre)patches. UP kernel gcc-2.7.2 486 with 800MB
Maxtor on a VL IDE running hdparm -m8 -u1 -c1

The ext2 error messages are those reported when booting back to 2.2.
(I'm assuming that kernel 2.2.16/17pre isn't at fault in this.)
Output from e2fsck -v and tune2fs -l are also included. Anyone else
observe this happen?

Paul.

-------------------------- log #1 -------------------------------

gromit:~# mount -vt ext2 /dev/hdc1 /mnt
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 1, stored = 1669, counted = 1665
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 5, stored = 1670, counted = 1665
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 11, stored = 1842, counted = 1665
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 12, stored = 1962, counted = 1884
/dev/hdc1 on /mnt type ext2 (rw)
gromit:~# umount -v /mnt/
/dev/hdc1 umounted
gromit:~# e2fsck -vr /dev/hdc1
e2fsck 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
/dev/hdc1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free inodes count wrong for group #1 (1669, counted=1665).
Fix<y>? yes

Directories count wrong for group #1 (116, counted=120).
Fix<y>? yes

Free inodes count wrong for group #5 (1670, counted=1665).
Fix<y>? yes

Directories count wrong for group #5 (109, counted=114).
Fix<y>? yes

Free inodes count wrong for group #11 (1842, counted=1665).
Fix<y>? yes

Directories count wrong for group #11 (0, counted=177).
Fix<y>? yes

Free inodes count wrong for group #12 (1962, counted=1884).
Fix<y>? yes

Directories count wrong for group #12 (0, counted=78).
Fix<y>? yes

Directories count wrong for group #1 (116, counted=120).
Fix<y>? yes

Free inodes count wrong for group #5 (1670, counted=1665).
Fix<y>? yes

Directories count wrong for group #5 (109, counted=114).
Fix<y>? yes

Free inodes count wrong for group #11 (1842, counted=1665).
Fix<y>? yes

Directories count wrong for group #11 (0, counted=177).
Fix<y>? yes

Free inodes count wrong for group #12 (1962, counted=1884).
Fix<y>? yes

Directories count wrong for group #12 (0, counted=78).
Fix<y>? yes

/dev/hdc1: ***** FILE SYSTEM WAS MODIFIED *****

   38975 inodes used (18%)
    4601 non-contiguous inodes (11.8%)
         # of inodes with ind/dind/tind blocks: 6860/125/1
  628185 blocks used (75%)
       0 bad blocks

   29491 regular files
    9418 directories
       0 character device files
       0 block device files
       0 fifos
  139090 links
      57 symbolic links (57 fast symbolic links)
       0 sockets
--------
  178056 files

gromit:~# tune2fs -l /dev/hdc1
tune2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 86fd1652-f63a-4501-9f75-d0f9a662ed06
Filesystem magic number: 0xEF53
Filesystem revision #: 0 (original)
Filesystem features: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 208896
Block count: 833615
Reserved block count: 0
Free blocks: 205430
Free inodes: 169921
First block: 1
Block size: 1024
Fragment size: 1024
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2048
Inode blocks per group: 256
Last mount time: Wed Jul 12 04:55:21 2000
Last write time: Wed Jul 12 04:58:58 2000
Mount count: 0
Maximum mount count: 50
Last checked: Wed Jul 12 04:58:58 2000
Check interval: 15552000 (6 months)
Next check after: Mon Jan 8 03:58:58 2001
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)

-------------------------- log #2 -------------------------------

gromit:~# mount -vt ext2 /dev/hdc1 /mnt
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 2, stored = 1568, counted = 1562
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 3, stored = 1563, counted = 1562
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 4, stored = 1595, counted = 1562
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 5, stored = 1594, counted = 1562
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 6, stored = 1579, counted = 1562
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 16, stored = 1827, counted = 1562
EXT2-fs error (device ide1(22,1)): ext2_check_inodes_bitmap: Wrong free inodes count in group 17, stored = 1840, counted = 1577
/dev/hdc1 on /mnt type ext2 (rw)
gromit:~# umount -v /mnt/
/dev/hdc1 umounted
gromit:~# e2fsck -vr /dev/hdc1
e2fsck 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
/dev/hdc1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free inodes count wrong for group #2 (1568, counted=1562).
Fix<y>? yes

Directories count wrong for group #2 (394, counted=400).
Fix<y>? yes

Free inodes count wrong for group #3 (1563, counted=1562).
Fix<y>? yes

Directories count wrong for group #3 (160, counted=161).
Fix<y>? yes

Free inodes count wrong for group #4 (1595, counted=1562).
Fix<y>? yes

Directories count wrong for group #4 (162, counted=195).
Fix<y>? yes

Free inodes count wrong for group #5 (1594, counted=1562).
Fix<y>? yes

Directories count wrong for group #5 (275, counted=307).
Fix<y>? yes

Free inodes count wrong for group #6 (1579, counted=1562).
Fix<y>? yes

Directories count wrong for group #6 (150, counted=167).
Fix<y>? yes

Free inodes count wrong for group #16 (1827, counted=1562).
Fix<y>? yes

Directories count wrong for group #16 (72, counted=337).
Fix<y>? yes

Free inodes count wrong for group #17 (1840, counted=1577).
Fix<y>? yes

Directories count wrong for group #17 (95, counted=358).
Fix<y>? yes

/dev/hdc1: ***** FILE SYSTEM WAS MODIFIED *****

   49063 inodes used (23%)
    6349 non-contiguous inodes (12.9%)
         # of inodes with ind/dind/tind blocks: 8215/168/1
  797461 blocks used (95%)
       0 bad blocks

   36117 regular files
   12860 directories
       0 character device files
       0 block device files
       0 fifos
  192499 links
      77 symbolic links (77 fast symbolic links)
       0 sockets
--------
  241553 files
gromit:~# tune2fs -l /dev/hdc1
tune2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 86fd1652-f63a-4501-9f75-d0f9a662ed06
Filesystem magic number: 0xEF53
Filesystem revision #: 0 (original)
Filesystem features: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 208896
Block count: 833615
Reserved block count: 0
Free blocks: 36154
Free inodes: 159833
First block: 1
Block size: 1024
Fragment size: 1024
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2048
Inode blocks per group: 256
Last mount time: Sun Aug 6 22:01:32 2000
Last write time: Sun Aug 6 22:42:13 2000
Mount count: 0
Maximum mount count: 50
Last checked: Sun Aug 6 22:42:13 2000
Check interval: 15552000 (6 months)
Next check after: Fri Feb 2 21:42:13 2001
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:15 EST