git: sys/vfs/hammer2: Add SEEK_HOLE / SEEK_DATA support
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Fri Jun 6 00:00:12 PDT 2025
commit bd41e746e6b77eb2be2d92ce1a71fad590fb3a33
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date: Thu Jun 5 02:49:32 2025 -0700
sys/vfs/hammer2: Add SEEK_HOLE / SEEK_DATA support
Similar to ext2 and ufs using VOP_BMAP based vn_bmap_seekhole().
- Add xop_bmap which corresponds to .vop_bmap.
- Add BUF_CMD_SEEK to prevent xop_bmap from being used for other
purposes e.g. cluster read / write. Note that vop_bmap_args::a_cmd
is only used in here and HAMMER1 (supports BUF_CMD_READ only,
and SEEK_XXX is unsupported).
Summary of changes:
sys/kern/vfs_vnops.c | 2 +-
sys/sys/buf.h | 3 ++-
sys/vfs/hammer2/hammer2.h | 11 ++++++++
sys/vfs/hammer2/hammer2_admin.c | 1 +
sys/vfs/hammer2/hammer2_ioctl.c | 6 +++++
sys/vfs/hammer2/hammer2_strategy.c | 37 +++++++++++++++++++++++++++
sys/vfs/hammer2/hammer2_xops.c | 51 ++++++++++++++++++++++++++++++++++++++
7 files changed, 109 insertions(+), 2 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bd41e746e6b77eb2be2d92ce1a71fad590fb3a33
--
DragonFly BSD source repository
More information about the Commits
mailing list