HomeFreeBSD

Add sbuf streaming mode to pseudofs(9), use in linprocfs(5)

Description

Add sbuf streaming mode to pseudofs(9), use in linprocfs(5)

Add a pseudofs node flag 'PFS_AUTODRAIN', which automatically emits sbuf
contents to the caller when the sbuf buffer fills. This is only
permissible if the corresponding PFS node fill function can sleep
whenever it appends to the sbuf.

linprocfs' /proc/self/maps node happens to meet this requirement.
Streaming out the file as it is composed avoids truncating the output
and also avoids preallocating a very large buffer.

Reviewed by: markj; earlier version: emaste, kib, trasz
Differential Revision: https://reviews.freebsd.org/D27047

Details

Provenance
cemAuthored on
Reviewer
emaste
Differential Revision
D27047: Add sbuf streaming mode to pseudofs(9), use in linprocfs(5)
Parents
rS367361: imgact_binmisc: fix up some minor nits
Branches
Unknown
Tags
Unknown