HomeFreeBSD

cache: reduce memory waste in struct namecache

Description

cache: reduce memory waste in struct namecache

The previous scheme for calculating the total size was doing sizeof
on the struct and then adding the wanted space for the buffer.

nc_name is at offset 58 while sizeof(struct namecache) is 64.
With CACHE_PATH_CUTOFF of 39 bytes and 1 byte of padding we were
allocating 104 bytes for the entry and never accounting for the 6
byte padding, wasting that space.

Details

Provenance
mjgAuthored on
Parents
rS366975: vfs: drop spurious cache_purge on rmdir
Branches
Unknown
Tags
Unknown