From: OGAWA Hirofumi Date: Tue, 8 Jan 2008 23:32:41 +0000 (-0800) Subject: fat: optimize fat_count_free_clusters() X-Git-Tag: v2.6.24-rc8~67 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f966be8996f2829406324c68e4c67c2d64d864b;p=pandora-kernel.git fat: optimize fat_count_free_clusters() On large partition, scanning the free clusters is very slow if users doesn't use "usefree" option. For optimizing it, this patch uses sb_breadahead() to read of FAT sectors. On some user's 15GB partition, this patch improved it very much (1min => 600ms). The following is the result of 2GB partition on my machine. without patch: root@devron (/)# time df -h > /dev/null real 0m1.202s user 0m0.000s sys 0m0.440s with patch: root@devron (/)# time df -h > /dev/null real 0m0.378s user 0m0.012s sys 0m0.168s Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed