Re: incorrect inode count on reiserfs
From: Nikita Danilov
Date: Mon Dec 08 2003 - 08:53:11 EST
Petr Sebor writes:
> I have noticed this behavior when moving the inn2 news server to
> 2.6.0-test11 kernel
> from 2.4.23
> (inn2 refuses to start because if free inode shortage)
>
> 2.6.0-test11:
> df -i:
>
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda1 0 0 0 - /
> /dev/sdb1 0 0 0 - /mnt/sdb1
>
> while df shows:
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/sda1 243208608 11069612 232138996 5% /
> /dev/sdb1 36150172 32840 36117332 1% /mnt/sdb1
>
> different reiserfs based machine with 2.4.23; this is where the inn2
> used to work before, but the inode test was not failing because of the
> 'always-nonzero' inode count:
>
> df -i
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/hde1 4294967295 0 4294967295 0% /
> /dev/hdg1 4294967295 0 4294967295 0% /mnt/d2
>
> df
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/hde1 77634256 77092844 541412 100% /
> /dev/hdg1 38586912 19156508 19430404 50% /mnt/d2
>
> another 2.6.0-test11 machine with ext2 reports inode counts correctly.
> my assumption is
> that the problem is somehow reiserfs related, but my knowledge ends here.
> all reiser fs's are of version 3.6
reiserfs has no fixed predefined number of inodes on the file
system. Hence, field f_files of struct statfs (see man 2 statfs) is not
applicable to this file system. Man page explicitly says:
Fields that are undefined for a particular file system are
set to 0.
Previous man page stated that file system should put -1 (4294967295)
into undefined fields. Reiserfs has been changed to conform to the
changed specification.
SuS simply says:
NAME
fstatvfs, statvfs - get file system information
SYNOPSIS
[XSI] #include <sys/statvfs.h>
int fstatvfs(int fildes, struct statvfs *buf);
int statvfs(const char *restrict path, struct statvfs *restrict buf);
DESCRIPTION
[...]
It is unspecified whether all members of the statvfs structure have
meaningful values on all file systems.
>
> any ideas?
inn2 should be fixed. :)
Fix would really be simple: ignore test results if ->f_files is 0 or
0xffffffff.
>
> Petr
>
Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/