improve [f]stat[v]fs functions, and possibly work around old kernels