Re: First impressions of reiserfs4

From: Oleg Drokin
Date: Mon Sep 08 2003 - 04:52:24 EST


Hello!

On Mon, Sep 08, 2003 at 11:33:04AM +0200, Rogier Wolff wrote:
> > > > > There is no installation program that will fail with: "Sorry,
> > > > > you only have 100 million inodes free, this program will need
> > > > > 132 million after installation", and it allows me a quick way
> > > > > of counting the number of actual files on the disk....
> > > > You cannot. statfs(2) only exports "Total number of inodes on disk" and
> > > > "number of free inodes on disk" values for fs. df substracts one from another one
> > > > to get "number of inodes in use".
> > > So, you report "oids_in_use + 100M" as total and "100M" as free inodes
> > > on disk. Voila!
> > Yes, we thought about that too. Need to be careful to not overflow
> > "long int".
> > And idea of filesystem with variable amount of inodes over time
> > sounds confusing to me, too. ]
> SO? That's actually the case. So it's confusing. So you're confusing
> people even more by telling nothing. Great.

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?

> > Well, if current interface does not allow to see all the stuff you want to,
> > time to change (introduce new one) interface, anyway.
> Fine, introduce a new interface. But report as much as you can on the
> old interface. Remember you can read/write/seek files using the 32bit
> interface even though the new (seek-, and stat-) interface uses 64
> bits.

You need to open a file with O_LARGEFILE first, so old binaries still won't work.

Bye,
Oleg
-
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/