<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in cddl</title>
    <link>http://nxr.netbsd.org/rss/src/external/cddl/</link>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2005</copyright>
    <generator>Java</generator>
    
<item>
    <title>Adapt to thorpej@'s uvm_lwp_is_pagedaemon() change<br/><br/>This is one step towards fixing the builds.</title>
    <description></description>
    <pubDate>Sun May 03 22:00:00 UTC 2026</pubDate>
    <dc:creator>kre</dc:creator>
</item>

<item>
    <title>osnet libuutil: Use mutex_init, not mutex_unlock, in child post-fork.<br/><br/>Using mutex_unlock may try to wake a thread that doesn't exist in the<br/>child, which could lead to trouble such as crash or deadlock.  But<br/>since the child is single-threaded, it is safe to just reinitialize<br/>the mutex memory anyway.<br/><br/>PR lib/59237: postfork mutex audit: mutex_init, not mutex_unlock</title>
    <description></description>
    <pubDate>Tue Apr 28 13:00:00 UTC 2026</pubDate>
    <dc:creator>riastradh</dc:creator>
</item>

<item>
    <title>zfs: port a fix for data corruption issue from illumos<br/><br/>see https://www.illumos.org/issues/17734 for the details.<br/><br/>note: i didn't bother to patch illumos/freebsd code in our tree.<br/><br/>the original commit message:<br/><br/>&gt; commit f6559a18843abdfa5849b9e74f239f9bd15796d3<br/>&gt; Author: Andy Fiddaman &lt;illumos@fiddaman.net&gt;<br/>&gt; Date:   Mon Nov 10 22:52:05 2025 +0000<br/>&gt;<br/>&gt;     17734 ZFS fsync can trigger ZIL transaction reordering and data corruption<br/>&gt;     Portions contributed by: Alexander Motin &lt;mav@FreeBSD.org&gt;<br/>&gt;     Reviewed by: Ryan Zezeski &lt;ryan@zinascii.com&gt;<br/>&gt;     Reviewed by: Toomas Soome &lt;tsoome@me.com&gt;<br/>&gt;     Approved by: Dan McDonald &lt;danmcd@edgecast.io&gt;<br/><br/>a review request on tech-kern:<br/>https://mail-index.netbsd.org/tech-kern/2026/03/04/msg030862.html</title>
    <description></description>
    <pubDate>Fri Mar 27 14:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>zfs: use 32-bit st_dev for stat(2)<br/><br/>while dev_t is 64-bit on NetBSD since the merge of<br/>christos-time_t branch in 2009, we only use the lower<br/>32-bit of it, at least for the purpose of specifying<br/>a device in the kernel.<br/><br/>however, dev_t is also used as a file system id. eg. st_dev<br/>reported by stat(2). as zfs has no device to naturally represent<br/>its file system, currently it reports 56-bit guid of the file<br/>system for the purpose.<br/><br/>unfortunately, some user applications still consider it as<br/>a good old device id and assumes operations like<br/>makedev(major(dev),minor(dev)) preserves the value.<br/>it doesn't hold for NetBSD's implementation of makedev and<br/>friends, which only honors the lower 32-bit of the dev_t.<br/><br/>this commit makes zfs report fsid with the high 32-bit zeros<br/>to avoid the issues in such applications. namely, this fixes an<br/>issue with rsync, reported by HIROSE yuuji on a japanese ML [1]<br/>in 2024. you can find his reproduce recipe below. i was able to<br/>reproduce the issue with rsync-3.4.1 from pkgsrc.<br/><br/>maybe we can "fix" our, at least userland-visible version of,<br/>makedev and friends to provide full 64-bit round-trip as some<br/>of other platforms do. (eg. glibc, freebsd)<br/>although it might be an improvement and can benefit other things<br/>like nfs v3, it isn't an alternative to this fix because it<br/>doesn't fix existing application binaries built with the current<br/>version of the macros.<br/><br/>note: this commit also changes statvfs f_fsid. as f_fsid is a long,<br/>before this change, we were truncating the value only on 32-bit ports.<br/><br/>note: this commit doesn't change the "netbsd-extended" fsid<br/>(f_fsidx), which is used for nfs file handles.<br/><br/>note: this commit would cause a flag day for applications which<br/>somehow save st_dev of files. are there such applications?<br/><br/>note: this commit would increase the chance of fsid conflicts.<br/>currently zfs ensures its fsids unique within zfs, but not with<br/>other netbsd file systems. with this commit, there can be conflict<br/>even within zfs. (mentioned in PR/60135)<br/><br/>```<br/>rm -rf src<br/>rm -rf dest<br/>mkdir -p src/a/b/c<br/>mkdir -p src/1/2/3<br/>mkdir dest<br/>rsync -avx --delete src dest<br/>rm -r src/1<br/>rsync -avx --delete src dest<br/>test -d dest/src/1 &amp;&amp; echo "this directory should have been removed"<br/>```<br/><br/>[1] http://www.re.soum.co.jp/~jun/welcome.html#netbsd<br/><br/>related to PR/60135<br/>https://gnats.netbsd.org/60135</title>
    <description></description>
    <pubDate>Fri Mar 27 13:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>zfs: fix "slow rm" issue (cont.)<br/><br/>commit a change which was lost during a porting from<br/>my local git repo to cvs.<br/>fortunately, it was harmless to miss this change though.</title>
    <description></description>
    <pubDate>Mon Mar 23 23:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>zfs: fix "slow rm" issue<br/><br/>* stop commiting zil in zfs_netbsd_reclaim and other operations<br/>  in vnode reclaim path.<br/><br/>* retire zfs_zget_cleaner/VN_RELE_CLEANER.<br/>  instead, just use normal zfs_zget and vrele_async.<br/><br/>note that these two changes depend on each other:<br/><br/>* zfs_zget_cleaner relies on zil_commit in zfs_netbsd_reclaim to<br/>  ensure that the znode referenced by TX_WRITE itx is always in-core.<br/><br/>* otoh, zfs_zget_clear makes zil_commit in the vnode reclaim path<br/>  possible. that is, zfs_netbsd_reclaim (VOP_RECLAIM) is called with<br/>  the vnode in VS_RECLAIMING state, which would make vcache_vget<br/>  block.<br/>  if the vnode being reclaimed happened to have TX_WRITE itx on the<br/>  zil, it deadlocks.<br/><br/>an alternative would be to make the upper layer (vfs_vnode.c) retain<br/>unlinked vnodes for a while. (a bit longer than the 5 sec txg commit<br/>interval should be enough.) eg. by making zfs_netbsd_inactive report<br/>a_recycle = 0. but i guess it's better to remove<br/>zfs_zget_cleaner/VN_RELE_CLEANER to to keep the code less diverged<br/>from the upstream zfs.<br/><br/>also, this commit makes zfs_umount retry vflush a bit.<br/>it's necessary because, for some reasons, during unmount, zil_close<br/>commits the log, which can load some referenced vnodes back to the<br/>cache. i don't understand why zil_close needs to commit the log<br/>when we are syncing txg for unmount anyway. although it might be<br/>possible to avoid the zil commit at all, probably this change<br/>is less invasive than that. this logic is partly from J. Hannken-Illjes.<br/><br/>PR/59885<br/>https://gnats.netbsd.org/59885<br/>discussed on tech-kern.<br/>https://mail-index.netbsd.org/tech-kern/2026/02/20/msg030817.html</title>
    <description></description>
    <pubDate>Sun Mar 22 13:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>zpool_find_import_impl: fix block/character device confusion<br/><br/>this commit fixes zpool import failure in some cases.<br/><br/>the current logic sometimes (eg. "zpool import -d" with a directory<br/>which is not "/dev") ends up with picking character devices<br/>and pass them to ZFS_IOC_POOL_TRYIMPORT/ZFS_IOC_POOL_IMPORT ioctl.<br/>such attempts would fail, marking the corrosponding vdevs UNAVAIL.<br/>this commit fixes it by skipping character devices.<br/><br/>also, this commit makes the label checking logic prefer to use<br/>character devices when available because it seems like the intention<br/>of the upstream logic.<br/><br/>also, this commit fixes import of file-backed vdevs.</title>
    <description></description>
    <pubDate>Fri Mar 20 00:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>zfs: fix zfs_range_lock_try<br/><br/>the change "zfs: add zfs_range_lock_try" was incomplete.<br/><br/>i've observed the following deadlock:<br/>```<br/>db{0}&gt; tr /a ffff96777f74f400<br/>trace: pid 0 lid 125 at 0xffffce80c3203b50<br/>sleepq_block() at netbsd:sleepq_block+0xf4<br/>cv_wait() at netbsd:cv_wait+0xca<br/>pool_grow() at netbsd:pool_grow+0x47b<br/>pool_get() at netbsd:pool_get+0xae<br/>pool_cache_get_slow() at netbsd:pool_cache_get_slow+0x136<br/>pool_cache_get_paddr() at netbsd:pool_cache_get_paddr+0x27d<br/>kmem_intr_alloc() at netbsd:kmem_intr_alloc+0x13c<br/>kmem_alloc() at netbsd:kmem_alloc+0x2a<br/>zfs_range_lock_impl() at zfs:zfs_range_lock_impl+0x30<br/>zfs_netbsd_putpages() at zfs:zfs_netbsd_putpages+0x1c0<br/>VOP_PUTPAGES() at netbsd:VOP_PUTPAGES+0x43<br/>uvm_pageout() at netbsd:uvm_pageout+0x257<br/>db{0}&gt;<br/>```<br/><br/>this commit fixes it by using KM_NOSLEEP when non-blocking<br/>operation is requested.</title>
    <description></description>
    <pubDate>Mon Mar 16 14:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>solaris vfs_optionisset: treat 0 as unspecified<br/><br/>this allows users to leave it default.<br/><br/>before this change, when a user runs "zfs mount -a",<br/>it was processed as "mount them read-write, overriding readonly property".<br/>i don't think it's what the user usually intends.<br/><br/>looking at the illumos code, it seems that mount options there are<br/>basically tri-state. that is, "ro", "rw", and unspecified.<br/>as NetBSD only has a single bit, MNT_RDONLY or !MNT_RDONLY, this commit<br/>maps !MNT_RDONLY to unspecified, which i believe more often matches<br/>the user's intention. it also seems like what illumos does for the legacy<br/>MS_RDONLY bit if i read their code correctly. that is, if MS_RDONLY is set,<br/>it sets MNTOPT_RO. on the other hand, a lack of MS_RDONLY doesn't imply<br/>MNTOPT_RW.<br/><br/>references:<br/>"Temporary Mount Point Properties" section of zfs(8)<br/><br/>PR/60024<br/>https://gnats.netbsd.org/60024</title>
    <description></description>
    <pubDate>Sun Mar 01 13:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>zfs: add zfs_range_lock_try<br/><br/>i plan to use this to fix pgdaemon deadlock issue. (PR/60004)<br/>(thus i didn't bother to implement RL_READER.)<br/><br/>note: recent openzfs has a similar function. (zfs_rangelock_tryenter)<br/>this commit ought to be reverted when/if we switch to it.<br/><br/>https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=60004</title>
    <description></description>
    <pubDate>Fri Feb 20 08:00:00 UTC 2026</pubDate>
    <dc:creator>yamt</dc:creator>
</item>

<item>
    <title>dtrace_sdt: Don't ignore the first stack frame in sdt probes.<br/><br/>The aframes argument to dtrace_probe_create gives the number of stack<br/>frames that are ignored in stack(), the first frame of which is<br/>`caller'.<br/><br/>This is for, e.g., profiler interrupts where the interrupt frame<br/>itself isn't interesting; it's the code that was interrupted that was<br/>interesting (hence profile_aframes = PROF_ARTIFICIAL_FRAMES is often<br/>nonzero, or even several frames deep).<br/><br/>But for sdt, the direct caller is the interesting part -- when we<br/>have something like:<br/><br/>foo()<br/>{<br/>	...<br/>	bar();<br/>	...<br/>}<br/><br/>bar()<br/>{<br/>	...<br/>	SDT_PROBE1(...);<br/>	...<br/>}<br/><br/>We want `caller' to be the return address in bar of SDT_PROBE1(...),<br/>not the return address in foo of bar().<br/><br/>PR kern/59934: dtrace_sdt: caller is off by a frame</title>
    <description></description>
    <pubDate>Thu Jan 22 04:00:00 UTC 2026</pubDate>
    <dc:creator>riastradh</dc:creator>
</item>

<item>
    <title>execsnoop: remove -J and trailing whitespace<br/><br/>-J is for jails, since this comes from FreeBSD; however it broke<br/>-a|-A.</title>
    <description></description>
    <pubDate>Sun Jan 11 22:00:00 UTC 2026</pubDate>
    <dc:creator>wiz</dc:creator>
</item>

<item>
    <title>dtrace: sprinkle #include &lt;sys/endian.h&gt;</title>
    <description></description>
    <pubDate>Sat Jan 10 17:00:00 UTC 2026</pubDate>
    <dc:creator>nia</dc:creator>
</item>

<item>
    <title>use &lt;sys/endian.h&gt; until I get this to play with rump builds</title>
    <description></description>
    <pubDate>Sat Jan 10 17:00:00 UTC 2026</pubDate>
    <dc:creator>nia</dc:creator>
</item>

<item>
    <title>nvpair: sprinkle #include &lt;sys/endian.h&gt;</title>
    <description></description>
    <pubDate>Sat Jan 10 16:00:00 UTC 2026</pubDate>
    <dc:creator>nia</dc:creator>
</item>

<item>
    <title>osnet: Sprinkle &lt;sys/endian.h&gt; inclusion.<br/><br/>prompted by PR pkg/59839</title>
    <description></description>
    <pubDate>Wed Jan 07 08:00:00 UTC 2026</pubDate>
    <dc:creator>nia</dc:creator>
</item>

<item>
    <title>Fix various typos in comments.</title>
    <description></description>
    <pubDate>Thu Dec 11 07:00:00 UTC 2025</pubDate>
    <dc:creator>andvar</dc:creator>
</item>

<item>
    <title>Allow code to include either (or both) of &lt;sys/elfdefinitions.h&gt; and<br/>&lt;sys/exec_elf.h&gt;, in any order.<br/><br/>This is a work-around to address PR lib/59564 (build breakage when<br/>both of these files are #included).<br/><br/>With this changeset, whichever file gets included first 'wins'.<br/>Prior changes in NetBSD and upstream at Elftoolchain have aligned the<br/>'generic' ELF definitions in NetBSD's &lt;sys/exec_elf.h&gt; with those<br/>in Elftoolchain's &lt;sys/elfdefinitions.h&gt;, so that either file can<br/>be used interchangeably when building NetBSD.<br/><br/>This changeset also removes prior workarounds in the source tree<br/>for this issue.<br/><br/>PR lib/59564</title>
    <description></description>
    <pubDate>Tue Nov 18 13:00:00 UTC 2025</pubDate>
    <dc:creator>jkoshy</dc:creator>
</item>

<item>
    <title>ctfconvert: supply more HAVE_NBTOOL_CONFIG_H<br/><br/>PR toolchain/59659</title>
    <description></description>
    <pubDate>Fri Sep 19 01:00:00 UTC 2025</pubDate>
    <dc:creator>ozaki-r</dc:creator>
</item>

<item>
    <title>PR/59659: Ryota Ozaki: Make the tool version behave the same way as the native.</title>
    <description></description>
    <pubDate>Thu Sep 18 13:00:00 UTC 2025</pubDate>
    <dc:creator>christos</dc:creator>
</item>
</channel></rss>

