]> git.baikalelectronics.ru Git - kernel.git/commit
ext2: statfs speed up
authorBadari Pulavarty <pbadari@us.ibm.com>
Mon, 16 Jul 2007 06:41:58 +0000 (23:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:52 +0000 (09:05 -0700)
commit38f02548d9ad6a9c0b5956ff32b9f419dd445585
tree162dad89927c77f9e640d43fefa7ca20b0653262
parent80d60aa7ea2abe67d729102aae98d68e6f06e0ac
ext2: statfs speed up

This is a patch that speeds up statfs.  It is very simple - the "overhead"
calculation, which takes a huge amount of time for large filesystems, never
changes unless the size of the filesystem itself changes.  That means we can
store it in memory and only recalculate if the filesystem has been resized
(almost never).

It also fixes a minor problem that we never update the on-disk superblock free
blocks/inodes counts until the filesystem is unmounted.  While not fatal, we
may as well update that on disk when we have the information, and it makes
things like debugfs and dumpe2fs report a bit more accurate info.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ext2/super.c
include/linux/ext2_fs_sb.h