<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libufs, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>ufs_disk_close.3: Correct include header macro</title>
<updated>2026-02-22T00:14:01+00:00</updated>
<author>
<name>Alexander Ziaee</name>
<email>ziaee@FreeBSD.org</email>
</author>
<published>2026-02-21T21:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=456ae9820823fcd078746318620925792f112c9a'/>
<id>456ae9820823fcd078746318620925792f112c9a</id>
<content type='text'>
This manual used the library macro to mark up a header file, causing
pollution in the apropos database for libraries, as well as omission
from the apropos database for headers. This also renders differently,
enclosing the header in angle brackets.

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This manual used the library macro to mark up a header file, causing
pollution in the apropos database for libraries, as well as omission
from the apropos database for headers. This also renders differently,
enclosing the header in angle brackets.

MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>packages: Use LIB_PACKAGE for zfs and ufs packages</title>
<updated>2025-09-12T20:56:51+00:00</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2025-09-11T19:46:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=29185c9a26204383270cf96957c685c51f5bc894'/>
<id>29185c9a26204383270cf96957c685c51f5bc894</id>
<content type='text'>
Commit f9513c334ff7 moved the shared libraries for ZFS and UFS into
separate packages (libzfs and libufs), which resulted in a rather
large number of packages being created, e.g. for ZFS:

FreeBSD-libzfs
FreeBSD-libzfs-dbg
FreeBSD-libzfs-dbg-lib32
FreeBSD-libzfs-dev
FreeBSD-libzfs-dev-lib32
FreeBSD-libzfs-lib32
FreeBSD-zfs
FreeBSD-zfs-dbg
FreeBSD-zfs-dbg-lib32
FreeBSD-zfs-dev
FreeBSD-zfs-dev-lib32
FreeBSD-zfs-lib32
FreeBSD-zfs-man

Use LIB_PACKAGE instead, which significantly reduces the number of
packages:

FreeBSD-zfs
FreeBSD-zfs-dbg
FreeBSD-zfs-dbg-lib32
FreeBSD-zfs-dev
FreeBSD-zfs-dev-lib32
FreeBSD-zfs-lib
FreeBSD-zfs-lib32
FreeBSD-zfs-man

MFC after:	3 days
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D52416
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit f9513c334ff7 moved the shared libraries for ZFS and UFS into
separate packages (libzfs and libufs), which resulted in a rather
large number of packages being created, e.g. for ZFS:

FreeBSD-libzfs
FreeBSD-libzfs-dbg
FreeBSD-libzfs-dbg-lib32
FreeBSD-libzfs-dev
FreeBSD-libzfs-dev-lib32
FreeBSD-libzfs-lib32
FreeBSD-zfs
FreeBSD-zfs-dbg
FreeBSD-zfs-dbg-lib32
FreeBSD-zfs-dev
FreeBSD-zfs-dev-lib32
FreeBSD-zfs-lib32
FreeBSD-zfs-man

Use LIB_PACKAGE instead, which significantly reduces the number of
packages:

FreeBSD-zfs
FreeBSD-zfs-dbg
FreeBSD-zfs-dbg-lib32
FreeBSD-zfs-dev
FreeBSD-zfs-dev-lib32
FreeBSD-zfs-lib
FreeBSD-zfs-lib32
FreeBSD-zfs-man

MFC after:	3 days
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D52416
</pre>
</div>
</content>
</entry>
<entry>
<title>add packages for libufs, libzfs</title>
<updated>2025-05-05T15:39:25+00:00</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2025-05-05T15:23:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f9513c334ff7d3ccdebfcb90f015890963768e0d'/>
<id>f9513c334ff7d3ccdebfcb90f015890963768e0d</id>
<content type='text'>
currently FreeBSD-utilities depends on both FreeBSD-ufs and FreeBSD-zfs.
this is not desirable, because those are both relatively large packages
and the user may want to remove one or the other – or perhaps both, e.g.
in a jail or embedded system.

the reason for this dependency is that fstyp(8), which is in
FreeBSD-utilities, links both libufs and libzfs.  FreeBSD-utilities is
the correct place for fstyp, so we don't want to move that.

instead, add two new packages: libufs contains libufs, and libzfs
contains libzfs plus the ZFS libraries it depends on: libavl, libnvpair,
libspl, libtpool, libumem, libuutil, libzfs_core and libzutil.

with this change, it is possible to remove FreeBSD-ufs and/or
FreeBSD-zfs while leaving FreeBSD-libufs, FreeBSD-libzfs and
FreeBSD-utilities installed.

Reviewed by:	manu, des
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50148
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
currently FreeBSD-utilities depends on both FreeBSD-ufs and FreeBSD-zfs.
this is not desirable, because those are both relatively large packages
and the user may want to remove one or the other – or perhaps both, e.g.
in a jail or embedded system.

the reason for this dependency is that fstyp(8), which is in
FreeBSD-utilities, links both libufs and libzfs.  FreeBSD-utilities is
the correct place for fstyp, so we don't want to move that.

instead, add two new packages: libufs contains libufs, and libzfs
contains libzfs plus the ZFS libraries it depends on: libavl, libnvpair,
libspl, libtpool, libumem, libuutil, libzfs_core and libzutil.

with this change, it is possible to remove FreeBSD-ufs and/or
FreeBSD-zfs while leaving FreeBSD-libufs, FreeBSD-libzfs and
FreeBSD-utilities installed.

Reviewed by:	manu, des
Approved by:	des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50148
</pre>
</div>
</content>
</entry>
<entry>
<title>Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106</title>
<updated>2025-01-31T01:31:08+00:00</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2025-01-31T01:27:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1111a44301da39d7b7459c784230e1405e8980f8'/>
<id>1111a44301da39d7b7459c784230e1405e8980f8</id>
<content type='text'>
UFS1 uses a signed 32-bit value for its times. Zero is
January 1, 1970 UTC. Negative values of 32-bit time predate
January 1, 1970 back to December 13, 1901. The maximum positive
value for 32-bit time is on January 19, 2038 (my 84th birthday).
On that date, time will go negative and start registering from
December 13, 1901. Note that this issue only affects UFS1 filesystems
since UFS2 has 64-bit times. This fix changes UFS1 times from
signed to unsigned 32-bit values. With this change it will no longer
be possible to represent time from before January 1, 1970, but it
will accurately track time until February 7, 2106. Hopefully there
will not be any FreeBSD systems using UFS1 still in existence by
that time (and by then I will have been dead long enough that no-one
will know at whom to yell :-).

It is possible that some existing UFS1 systems will have set times
predating January 1, 1970. With this commit they will appear as
later than the current time. This commit checks inode times when
they are read into memory and if they are greater than the current
time resets them to the current time. By default this reset happens
silently, but setting the sysctl vfs.ffs.prttimechgs=1 will cause
console messages to be printed whenever a future time is changed.

Reviewed-by: kib
Tested-by:   Peter Holm
MFC-after:   1 week
Differential Revision: https://reviews.freebsd.org/D48472
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UFS1 uses a signed 32-bit value for its times. Zero is
January 1, 1970 UTC. Negative values of 32-bit time predate
January 1, 1970 back to December 13, 1901. The maximum positive
value for 32-bit time is on January 19, 2038 (my 84th birthday).
On that date, time will go negative and start registering from
December 13, 1901. Note that this issue only affects UFS1 filesystems
since UFS2 has 64-bit times. This fix changes UFS1 times from
signed to unsigned 32-bit values. With this change it will no longer
be possible to represent time from before January 1, 1970, but it
will accurately track time until February 7, 2106. Hopefully there
will not be any FreeBSD systems using UFS1 still in existence by
that time (and by then I will have been dead long enough that no-one
will know at whom to yell :-).

It is possible that some existing UFS1 systems will have set times
predating January 1, 1970. With this commit they will appear as
later than the current time. This commit checks inode times when
they are read into memory and if they are greater than the current
time resets them to the current time. By default this reset happens
silently, but setting the sysctl vfs.ffs.prttimechgs=1 will cause
console messages to be printed whenever a future time is changed.

Reviewed-by: kib
Tested-by:   Peter Holm
MFC-after:   1 week
Differential Revision: https://reviews.freebsd.org/D48472
</pre>
</div>
</content>
</entry>
<entry>
<title>Standardize the definition of a UFS dinode.</title>
<updated>2025-01-28T01:39:45+00:00</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2025-01-28T01:39:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=aa90fbed151de512ab6e59f75df009533a15751f'/>
<id>aa90fbed151de512ab6e59f75df009533a15751f</id>
<content type='text'>
Each program that operates on UFS on-disk inodes defines its own
version of a dinode. They all (of necessity) define the same
layout but use different names. This change adds a definition of
a dinode (a union of a UFS1 on-disk inode and a UFS2 on-disk inode)
as well as a dinodep (a union of a pointer to a UFS1 on-disk inode
and a pointer to a UFS2 on-disk inode) in sys/ufs/ufs/dinode.h.
It then deletes the definitions of dinode and dinodep in all the
programs that operate on them and instead uses these standard
definitions.

No functional change intended.

MFC-after: 1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each program that operates on UFS on-disk inodes defines its own
version of a dinode. They all (of necessity) define the same
layout but use different names. This change adds a definition of
a dinode (a union of a UFS1 on-disk inode and a UFS2 on-disk inode)
as well as a dinodep (a union of a pointer to a UFS1 on-disk inode
and a pointer to a UFS2 on-disk inode) in sys/ufs/ufs/dinode.h.
It then deletes the definitions of dinode and dinodep in all the
programs that operate on them and instead uses these standard
definitions.

No functional change intended.

MFC-after: 1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>man filesystems: fix xrefs after move to section 4</title>
<updated>2024-05-16T16:25:29+00:00</updated>
<author>
<name>Alexander Ziaee</name>
<email>concussious@runbox.com</email>
</author>
<published>2024-05-15T18:59:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1a720cbec513210fa2e85c3882741ef2f6dc5f35'/>
<id>1a720cbec513210fa2e85c3882741ef2f6dc5f35</id>
<content type='text'>
Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Automated cleanup of cdefs and other formatting</title>
<updated>2023-11-27T05:23:59+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-24T20:12:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a2f733abcff64628b7771a47089628b7327a88bd'/>
<id>a2f733abcff64628b7771a47089628b7327a88bd</id>
<content type='text'>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+&lt;sys/cdefs.h&gt;.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/types.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/param.h&gt;/
Remove /\n+#include\s+&lt;sys/cdefs.h&gt;\n#include\s+&lt;sys/capsicum.h&gt;/

Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure I/O buffers in libufs(3) are 128-byte aligned.</title>
<updated>2023-11-17T22:11:24+00:00</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2023-11-17T22:10:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=772430dd67955850942d689714ab982da24257ba'/>
<id>772430dd67955850942d689714ab982da24257ba</id>
<content type='text'>
Various disk controllers require their buffers to be aligned to a
cache-line size (128 bytes). For buffers allocated in structures,
ensure that they are 128-byte aligned. Use aligned_malloc to allocate
memory to ensure that the returned memory is 128-byte aligned.

While we are here, we replace the dynamically allocated inode buffer
with a buffer allocated in the uufsd structure just as the superblock
and cylinder group buffers do.

This can be removed if/when the kernel is fixed. Because this problem
has existed on one I/O subsystem or another since the 1990's, we
are probably stuck with dealing with it forever.

The problem most recent showed up in Azure, see:
    https://reviews.freebsd.org/D41728
    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267654
Before these fixes were applied, it was confirmed that the changes
in this commit also fixed the issue in Azure.

Reviewed-by: Warner Losh, kib
Tested-by:   Souradeep Chakrabarti of Microsoft (earlier version)
PR:          267654
Differential Revision: https://reviews.freebsd.org/D41724
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Various disk controllers require their buffers to be aligned to a
cache-line size (128 bytes). For buffers allocated in structures,
ensure that they are 128-byte aligned. Use aligned_malloc to allocate
memory to ensure that the returned memory is 128-byte aligned.

While we are here, we replace the dynamically allocated inode buffer
with a buffer allocated in the uufsd structure just as the superblock
and cylinder group buffers do.

This can be removed if/when the kernel is fixed. Because this problem
has existed on one I/O subsystem or another since the 1990's, we
are probably stuck with dealing with it forever.

The problem most recent showed up in Azure, see:
    https://reviews.freebsd.org/D41728
    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267654
Before these fixes were applied, it was confirmed that the changes
in this commit also fixed the issue in Azure.

Reviewed-by: Warner Losh, kib
Tested-by:   Souradeep Chakrabarti of Microsoft (earlier version)
PR:          267654
Differential Revision: https://reviews.freebsd.org/D41724
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line nroff pattern</title>
<updated>2023-08-16T17:55:10+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fa9896e082a1046ff4fbc75fcba4d18d1f2efc19'/>
<id>fa9896e082a1046ff4fbc75fcba4d18d1f2efc19</id>
<content type='text'>
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
</feed>
