-
Optimize
vnop_readdir
modeVNODE_READDIR_EXTENDED
in kernel extensionOur user space buffer for
VNODE_READDIR_EXTENDED
needs to be smaller since re-packing will expand eachstruct fuse_dirent
.The worse case (when the name length is 8) corresponds to a
struct direntry
size of 40 bytes (8-byte aligned) and astruct fuse_dirent
size of 32 bytes (8-byte aligned). So having a buffer that is 4/5 the size will prevent us from reading more than we can pack.