[Exim] Re: check_spool_inodes / reiserfs / Linux 2.6 bug

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Mark Bergsma
CC: mrten+exim, exim-users
Subject: [Exim] Re: check_spool_inodes / reiserfs / Linux 2.6 bug
On Tue, 24 Feb 2004, Mark Bergsma wrote:

> However, according to the manpage for statfs(), value 0 means 'undefined':
>
> "Fields that are undefined for a particular file system are set to 0."
>
> Probably reiserfs doesn't have the concept of free inodes, hence returns
> 0. Other filesystems like ext2/3 return nonzero values.
>
> I think this is a flaw in the design of the statfs() call, as there is
> no way for it to state that there are no inodes left for filesystems
> that do have this concept. However, I think this is a bug in Exim,
> because it should regard 0 as a special value.
>
> I do not know and I have not checked how statfs() behaves in this regard
> on other unix systems, but I hope this is not yet another incompatibility...


I've now got to this work item. It seems to me that the best fix is not
to change "if >= 0 do the test" to "if > 0 do the test", but instead to
add "if total # of inodes > 0 and" to the existing test. I presume (but
cannot test) that if Reiserfs is returning 0 for free inodes, it will
also return 0 for total inodes. Thus, on a FS where 0 really does mean
"there are no inodes left", the test will work, as presumably the total
will be > 0.

Does this make sense?

Some names of the fields in the stat(v)fs structure differ from system to
system. I have checked all those I have easy access to, and they all
have f_files for total # of inodes. If anybody has an OS in which this
field is NOT found in the structure that "man statfs" or "man statvfs"
shows you, please let me know.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.