HomeFreeBSD

tmpfs_getattr(): Return more correct allocated byte counts.

Description

tmpfs_getattr(): Return more correct allocated byte counts.

For VREG vnodes, return the resident page count (multiplied by PAGE_SIZE)
for the tmpfs node's anonymous VM object that stores actual file contents.

For all other vnodes, return the tmpfs_node's tn_size, which should not
be rounded to a page.

This change allows using stat(2) to identify a sparse file on tmpfs.

Reviewed by: kib
MFC after: 1 week

Details

Provenance
willAuthored on
Parents
rS281377: Add build support for i386 loader.efi
Branches
Unknown
Tags
Unknown

Event Timeline