HomeFreeBSD

getblkx(9): be more tolerant but also strict with the buffer size checks

Description

getblkx(9): be more tolerant but also strict with the buffer size checks

It is possible that on-disk filesystem format causes allocation of
buffers of size larger than maxbcachebuf. Currently, getblkx() and
indirectly bufkva_alloc() panic in that situation.

It is more useful to return an error instead, allowing the system to
continue running.

PR: 277414
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
kibAuthored on Mar 2 2024, 4:58 AM
Parents
rGbeadbca67bd8: read(2): Add write cross reference
Branches
Unknown
Tags
Unknown