Re: First impressions of reiserfs4

From: Oleg Drokin
Date: Mon Sep 08 2003 - 03:13:49 EST


Hello!

On Sun, Aug 31, 2003 at 07:14:19PM +0200, Rogier Wolff wrote:

> Would it be possible to do something like: "pretend that there
> are always 100 million inodes free", and then report sensible
> numbers to "df -i"?

This won't work. No sensible numbers would be there.

> 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".
Actually we export necessary numbers through sysfs for now. And we have patch
in our tree that just sets statfs(2) inode stuff to zero. You should see it after
next snapshot is released.

$ cat /sys/fs/reiser4/hdb1/oids_in_use
104875
$ cat /sys/fs/reiser4/hdb1/next_to_use
261239

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/