git: sys/kern: Add SEEK_HOLE / SEEK_DATA support

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


commit 128dc99841040ad1f899f56aaffac455f359153e
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Mon May 19 01:58:11 2025 -0700

    sys/kern: Add SEEK_HOLE / SEEK_DATA support
    
    No filesystem implements SEEK_HOLE / SEEK_DATA yet.
    
    Filesystems with no .vop_ioctl implementation (e.g. ufs, ext2)
    use vop_stdioctl() which simply returns EOF for SEEK_HOLE.
    Others usually return EOPNOTSUPP, ENOTTY, etc, depending on what
    they have for "default" in a switch case.
    
    taken-from: FreeBSD

Summary of changes:
 lib/libc/sys/lseek.2    | 70 ++++++++++++++++++++++++++++++++++++++++++++++++-
 lib/libc/sys/pathconf.2 | 12 +++++++++
 sys/kern/vfs_default.c  | 38 ++++++++++++++++++++++++++-
 sys/kern/vfs_vnops.c    | 19 ++++++++++++++
 sys/sys/filio.h         |  3 +++
 sys/sys/vnode.h         |  1 +
 6 files changed, 141 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/128dc99841040ad1f899f56aaffac455f359153e


-- 
DragonFly BSD source repository


More information about the Commits mailing list