Re: First impressions of reiserfs4

From: Herbert Poetzl
Date: Mon Sep 08 2003 - 08:01:15 EST


On Mon, Sep 08, 2003 at 02:17:04PM +0400, Oleg Drokin wrote:
> Hello!
>
> On Mon, Sep 08, 2003 at 12:05:31PM +0200, Rogier Wolff wrote:
> > > Well, but statfs(2) does not return an "inodes in use" value, that's it.
> > > > #define LARGE_NUMBER 100000
> > > > out->total_inodes = fs->oids_in_use + LARGE_NUMBER;
> > > > if (out->total_inodes < fs->oids_in_use)
> > > > out -> total_inods = MAXINT;
> > > > out -> free_inodes = LARGE_NUMBER;
> > > > Three lines of code fixes that.
> > > Yes, and you get complete crap once you hit the overflow condition?
> > No. Not complete crap. It's a thirty two bit integer. What do you expect
> > when you hit the "limit"?

what about

total_inods = MAXINT
free_inodes = total_inods - oids_in_use;

this would not change from one moment to
the other, reflect the correct amount, and
stay within limits for reasonable iods_in_use

best,
Herbert

-
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/