>> It's an obvious optimization to keep type already in the directory >> itself. But is there any other reason why it was added there? It >> obviously means you have the same information in two places, [...] > struct dirent is not stored on the disk, but created during eg > readdir() system call via VOP_READDIR(), etc.
Perhaps, but the type _is_ stored on the disk in recent implementations. See src/sys/ufs/ufs/dir.h in 5.2, for example. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B