HomeFreeBSD

p9fs: implement basic pathconf support

Description

p9fs: implement basic pathconf support

This is needed for various pjdfstest tests which fail with syntax errors
if pathconf _PC_NAME_MAX/_PC_PATH_MAX return -1. For NAME_MAX we can use
the 9P2000.L Tstatfs call to get namelen from the host. While this could
theoretically be different for nested filesystems in the shared mount it
is a much better guess than just returning 255.
There does not seem to be a way to get the host PATH_MAX, so we just
return the conservative kernel default.

Found while fixing https://github.com/CTSRD-CHERI/cheribsd/issues/2617.

Reviewed by: markj, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56493

Details

Provenance
arichardsonAuthored on May 7 2026, 4:22 AM
Reviewer
markj
Differential Revision
D56493: p9fs: implement basic pathconf support
Parents
rG1ed2ef42e017: p9fs: Move UMA zone initialization to VFS module lifecycle
Branches
Unknown
Tags
Unknown