opnsense-src/sys/fs/tarfs
Mark Johnston 268afe7247 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)
2024-04-15 10:06:12 -04:00
..
tarfs.h vfs: use __enum_uint8 for vtype and vstate 2023-07-05 15:06:30 +00:00
tarfs_dbg.h tarfs: Use a separate debug bit for bounce buffer usage. 2023-02-16 00:40:45 +00:00
tarfs_io.c tarfs: Don't use IO_DIRECT when reading from tarball. 2023-06-20 10:02:10 +00:00
tarfs_subr.c vfs: use __enum_uint8 for vtype and vstate 2023-07-05 15:06:30 +00:00
tarfs_vfsops.c tarfs: Inherit mnt_iosize_max from the lower vnode 2024-04-15 10:05:13 -04:00
tarfs_vnops.c tarfs: Implement VOP_BMAP 2024-04-15 10:06:12 -04:00