git: sys/vfs/{ext2fs,ufs}: Add SEEK_HOLE / SEEK_DATA support

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Fri May 23 02:16:02 PDT 2025


commit 0c27d8551f12746fc87b0ff284f2b45432730a16
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Tue May 20 00:45:07 2025 -0700

    sys/vfs/{ext2fs,ufs}: Add SEEK_HOLE / SEEK_DATA support
    
    Add VOP_BMAP based generic function vn_bmap_seekhole()
    for filesystems with .vop_bmap to support SEEK_HOLE / SEEK_DATA.
    
    FreeBSD has optimized version of FIOSEEKDATA for ext2 and ufs,
    but this commit only brings in generic version for both.
    
    taken-from: FreeBSD

Summary of changes:
 sys/kern/vfs_vnops.c        | 77 +++++++++++++++++++++++++++++++++++++++++++++
 sys/sys/vnode.h             |  5 +++
 sys/vfs/ext2fs/ext2_vnops.c | 15 +++++++++
 sys/vfs/ufs/ufs_vnops.c     | 39 ++++++++++++++++++++++-
 4 files changed, 135 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0c27d8551f12746fc87b0ff284f2b45432730a16


-- 
DragonFly BSD source repository


More information about the Commits mailing list