Re: Maximum stream size in O_NAMEDATTR?

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Mon, 18 Aug 2025 01:44:50 UTC
On Sun, Aug 17, 2025 at 2:13 PM Dan Shelton <dan.f.shelton@gmail.com> wrote:
>
> Hello!
>
> What is the maximum stream size for files in O_NAMEDATTR? Windows NTFS
> and ReFS support an unlimited stream size and each stream can be
> sparse (POSIX terminology: lseek(..., SEEK_HOLE/SEEK_DATA) and
> punching holes in the middle of a stream works), and Solaris ZFS
> supports this too.
>
> Can FreeBSD O_NAMEDATTR do the same?
Yes, I believe so. (The named attributes are just regular files
and can be read/written like any other regular file.)
SEEK_DATA/SEEK_HOLE should work on them, although it
can be a big performance hit for recently written files. (ZFS
either syncs everything so that it gets an "accurate" answer,
which is a big performance hit for recently written files Or it
can be configured to do a quick version that might miss a hole
for recently written files. The missed hole will still read as zeros,
but isn't spotted by SEEK_HOLE.)

FreeBSD can do a Deallocate to punch a hole in it, which should
work, afaik.

rick

>
> Dan
> --
> Dan Shelton - Cluster Specialist Win/Lin/Bsd
>