🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.hackers
2 messages
2 total messages Started by Cedric Blancher Fri, 20 Nov 2026 10:09
Fwd: [developer] 18752 zfs SEEK_DATA/SEEK_HOLE reports a hole over data written only through mmap()
#105
Author: Cedric Blancher
Date: Fri, 20 Nov 2026 10:09
60 lines
7473 bytes
Good morning!

Is this issue fixed in FreeBSD 16. from October 2026

Ced

---------- Forwarded message ---------
From: Greg Burd <greg@burd.me>
Date: Wed, 18 Nov 2026 at 14:42
Subject: [developer] 18752 zfs SEEK_DATA/SEEK_HOLE reports a hole over
data written only through mmap()
To: <developer@lists.illumos.org>


Hello.

A file written only through a MAP_SHARED mapping and closed without
msync() is reported by lseek(SEEK_DATA/SEEK_HOLE) as a hole until its
txg syncs. Sparse-aware copies (GNU cp 9.x, install, rsync --sparse)
then write zeros. We hit it in the wild: Go's linker writes its output
through mmap, and go install produced binaries with whole 128K records
of zeros.

This ports the OpenZFS fix (de198f2d9507, Brian Behlendorf; made
synchronous in 102b468b5e19, Robert Evans): zfs_holey() pushes the
vnode's cached pages with VOP_PUTPAGE before dmu_offset_next(), as
zfs_fsync() does.

It adds a regression test, tests/functional/mmap/mmap_seek_001_pos, with
a small helper, cmd/mmap_seek. The test fails at every size on an
unpatched kernel (OpenIndiana illumos-31d3d510d0) and passes with the
fix. FWIW, Solnix.io (my fork/distro) has carried the fix since October.

Matt, Gordon: you've been closest to the recent OpenZFS imports, so your
review would be especially welcome.

best.

-greg

Issue: https://www.illumos.org/issues/18752
Review: https://code.illumos.org/c/illumos-gate/+/5298



------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/Tb528828415aa9d13-M24db5b651ec39601d1d213c5
Delivery options: https://illumos.topicbox.com/groups/developer/subscription


-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: [developer] 18752 zfs SEEK_DATA/SEEK_HOLE reports a hole over data written only through mmap()
#106
Author: Dag-Erling Smørgrav
Date: Fri, 20 Nov 2026 12:26
13 lines
2331 bytes
Cedric Blancher <cedric.blancher@gmail.com> writes:
> Is this issue fixed in FreeBSD 16. from October 2026

It was fixed in 2023.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads