Re: nr_files in linux-2.4.0-test2

From: Tigran Aivazian (tigran@veritas.com)
Date: Mon Jun 26 2000 - 10:49:16 EST


Arjan,

the variables are just fine - their values are correct, it is just proc
displaying them starting from the address of the first variable and
assuming that the next two are allocated sequentially. I have fixed this
(and it went into ac-X) by putting them in a structure but it would appear
that, in principle, there can be gaps between members of a structure as
well, so the better solution would be to use arrays. I will do the fix as
soon as I have a spare minute - note that this should be done *both* for
nr_file and for fs/inode.c:inodes_stat which is currently a structure
(i.e. it works but it makes the assumption that is currently agreed to be
wrong)

Regards,
Tigran

On Mon, 26 Jun 2000, Chris Mason wrote:

>
>
> On Sun, 25 Jun 2000, Arjan van de Ven wrote:
>
> > In article <Pine.LNX.4.10.10006251321150.11318-100000@home.suse.com> you wrote:
> >
> > > Hello,
> >
> > > Looks as though nr_files in fs/file_table.c is not being initialized
> > > anymore, on my box it is starting at a large negative number. So, was
> > > this supposed to be zero filled elsewhere, or do we just need the
> > > following patch?
> >
> > This also might be caused by the thing Tigran found: some portions of the
> > kernel expect that
> >
> > int x;
> > int y;
> > int z;
> >
> > are consecutive in memory when they export it to /proc.
> >
> Ahh, ok, this look like it. These variables used to be in a struct, but
> are now just individual ints. Extra testing with printks shows them all
> at 0, so it is just /proc that is wrong.
>
> -chris
>
>

-
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 : Mon Jun 26 2000 - 21:00:09 EST