df statfs statvfs 在vfat分区上速度慢

用strace df 跟踪,发现卡在statfs64。

 

解决方法:

mount fat分区时候加上-o usefree参数就可以了

 

http://topic.csdn.net/u/20110609/17/1163acbc-cc43-4fb7-8aac-9ba60adfe986.html

http://linux.die.net/man/8/mount

 

usefree

Use the "free clusters" value stored on FSINFO. It'll be used to determine number of free clusters without scanning disk. But it's not used by default, because recent Windows don't update it correctly in some case. If you are sure the "free clusters" on FSINFO is correct, by this option you can avoid scanning disk.

posted on 2011-11-09 13:56  katago  阅读(1173)  评论(0编辑  收藏  举报