Article View: muc.lists.freebsd.hackers
Article #105Fwd: [developer] 18752 zfs SEEK_DATA/SEEK_HOLE reports a hole over data written only through mmap()
From: Cedric Blancher
Date: Fri, 20 Nov 2026 10:09
Date: Fri, 20 Nov 2026 10:09
60 lines
7473 bytes
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
Technical Details
Message-ID:
<CALXu0UctGyE325ZzxofR3TtrYXwzbYvNRu4wCD4ZqXFPDRYAwA@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<avy6kqW19bbjU7mr@floki>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Cedric Blancher <cedric.blancher@gmail.com>
Newsgroups: muc.lists.freebsd.hackers
Subject: Fwd: [developer] 18752 zfs SEEK_DATA/SEEK_HOLE reports a hole over
data written only through mmap()
Date: Fri, 20 Nov 2026 11:09:37 +0100
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <CALXu0UctGyE325ZzxofR3TtrYXwzbYvNRu4wCD4ZqXFPDRYAwA@mail.gmail.com>
References: <avy6kqW19bbjU7mr@floki>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
logging-data="15493"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1795169420;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references:list-id:list-help:
list-owner:list-unsubscribe:list-subscribe:list-post;
bh=spn9UO5AHHFSkgv9JJq429jOHKdI9y79NxHpOTjvuTA=;
b=Q+rughhZiRv/hMHPYxntX24LIiAYijSnc7GXHyiv7gDan90o1ltZ3q3/oALUgxf5d4MXf+
wu9J5BaQQEtRwV0norETRPJf7o4ODzJLsq54+yCz4y87yQNfqNE2/AM64NLw7YqkfXdKKX
pJgAfba7Xga8o76qijNA477EpZKg/OpnOpFbMCNf+mAYoACdiaG8JPUzAVYRLztGKo6XD9
v1S/4ZH1FUyKesEoK4b98DEudhvO+ByJ4xQZ2XhuI8f5U2H0sVd8pLvdmzgizFc7xXC3rp
u3NZCf3L0tSpFH5DKkxmQ1Zl8zT/BGrHODFpm4DwN2WinhqtOSP1aGOtsj/PWA==
X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
dkim=pass header.d=gmail.com header.s=20260707 header.b=S1OT9ryP;
spf=pass (mx1.freebsd.org: domain of cedric.blancher@gmail.com designates 2607:f8b0:4864:20::c29 as permitted sender) smtp.mailfrom=cedric.blancher@gmail.com;
dmarc=pass (policy=none) header.from=gmail.com;
arc=pass ("google.com:s=arc-20260327:i=1")
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1795169414; x=1795774214; darn=freebsd.org;
h=content-type:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=spn9UO5AHHFSkgv9JJq429jOHKdI9y79NxHpOTjvuTA=;
b=S1OT9ryPxV8DTGxJz7CxV+rpmMwLux1Vf/+/r1z2Q1qDUPMthEJQ38SXfUm9sjUPRN
0N5JZ9J/A1DyzzBvgu+ptTEVnHlwgzpbddLMDqZW6/3i7YWbgLclLm1Ksql4BdZLmCKv
EUqPq7AxRir2AacUnHL7vfmdDNjruY8RcuahUFKnB1KxID/2331AQbDcSJMuvXKa0Rpr
voaaItrgMmAsP1tynbrLbbSbt/vTw/oirXNIF//TMG2sHosPrlyKQRdVg+HSMIgctu/c
UiKdlC+bdLPaetRl6HpBJDI7Wu7lZx18HWnQ+QnCRHv5A45wVTFc15GbeyYUpTnfE5Rk
kBXQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795169414; x=1795774214;
h=content-type:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=spn9UO5AHHFSkgv9JJq429jOHKdI9y79NxHpOTjvuTA=;
b=cQ08S1sxPH6mswZFEmEeLGmKf9KgiKgvlp270cbm4eqWwS5j4kxvFPTyr7rmBaEOzB
PI2MVhyZ5aibYfW6DCKl1UA/J27XGEGYimMabduLqu02U+lB2AYs+SyK1YcMyilZyiPZ
/MJfuGe/RtLGEnm1tAgdd414lj6bteJyFertSmO4WWVvlQW+vrm5adbk+ATVhEGDMJN2
752RbF6ZziNzLiLAKMxCX4TxnLKXCjZiXoOZrviB4qr2xoOdNqDUCztFxAkUsYMZLBzt
NHgidSfw385AmZ4F/FcS2rQ/kL3/YDuTEBVvgMp2lGGk5ICWb4CAHGlfzsDO95eh5sga
Lq1g==
X-Gm-Message-State: APuU4Z942gf2JbFEApQPpVzQ+M6yz39+2U2k6C13mi6C3/HFFTby+kqZ
2p4a6KEBUiuPtfkHqfYF5UfdWkMiH5IN2MnJswxOfgOdSlG/eDZdAi561T3Ld9cwgRbcQM0qM1a
OaEG/8Of5kUYjtYMOCVB3CpUsPPv/TKfQvQ==
X-Gm-Gg: AYBFou0DyzHqaLtGd30EcSgHjTCExn2/WVWgdb15dDHj/1JwQ/xDEzMuUAb9cOn4kmj
nhtO/4bgSZcBRTwVbRZ+AnKyTImoH6Drb+W9DX+o2B67/1NT+c02K2lZ47y13Ix6jWVm//LuH8i
Q5AM9h3PEJV5oIPVJxXSMq6IODcr0zRMlmoyvdx/EDn8yXyes1xZipBrmBEz4lWsvWYgzMSzxbp
3LmcD+STP+Tr/mccHilEnygUiOFWf0N/f58i65ZAYtXYDkVicSmma63MFvpxgbwE4P5T7k83lkc
dJSlyOuzbIRvDpIMtHxvjK7EUcQ+nBpDSWIm/rd98IezFoJC4jThU499ZtL5EymbxXYRB0dpjYK
pF34j7TJamVsx3bVonS4tbp054LElBFXxXdbgjUI=
Precedence: list
In-Reply-To: <avy6kqW19bbjU7mr@floki>
X-Gm-Features: Aa3M54o7L1geXdWmKRBjVbf2bMTu2kiyPO5H9JU6mgNQG6mcUEQdhn0z0x8S0Gk
X-Rspamd-Queue-Id: 4jWB0m3QFlz4sfJ
X-Spamd-Bar: --
X-Spamd-Result: default: False [-2.00 / 15.00];
ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1];
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c];
R_DKIM_ALLOW(-0.20)[gmail.com:s=20260707];
MIME_GOOD(-0.10)[text/plain];
RCVD_COUNT_ONE(0.00)[1];
ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
MIME_TRACE(0.00)[0:+];
FREEMAIL_FROM(0.00)[gmail.com];
MISSING_XM_UA(0.00)[];
DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
FREEMAIL_ENVFROM(0.00)[gmail.com];
RCPT_COUNT_ONE(0.00)[1];
MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org];
RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::c29:from];
TO_DN_NONE(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
MID_RHS_MATCH_FROMTLD(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
RCVD_TLS_LAST(0.00)[];
PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org];
ALIAS_RESOLVED(0.00)[];
DKIM_TRACE(0.00)[gmail.com:+]
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes