And while you're there make sure you check for "ludicrous" values, perhaps some lower bound on files/dir... warn about it, too. When you scan, do you check that the st_dev's all match? (since it was suggested earlier that this is a constraint that must hold true, it would seem appropriate to catch it early...)