HomeFreeBSD

tarfs: Implement VOP_BMAP

Description

tarfs: Implement VOP_BMAP

This lets tarfs provide readahead/behind hints to the VFS, which helps
memory-mapped I/O performance, important when running faulting in
executables out of a tarfs mount as one might if tarfs is used to back
the root filesystem, for example. The improvement is particularly
noticeable when the backing tarball is zstd-compressed.

The implementation simply returns the extent of the virtual block
containing the target offset, clamped by the maximum I/O size. This is
perhaps simplistic; it effectively just chooses values that would
correspond to a single VOP_READ call in tarfs_read_file().

Reviewed by: des, kib
MFC after: 1 month
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D44626

(cherry picked from commit a0895e394d3fec374e61a207bdfa0245dae86f53)

Details

Provenance
markjAuthored on Apr 5 2024, 3:14 PM
Reviewer
des
Differential Revision
D44626: tarfs: Implement VOP_BMAP
Parents
rG5128c8948b4e: swap_pager: Unbusy readahead pages after an I/O error
Branches
Unknown
Tags
Unknown