Re: openat(3,".",O_RDONLY|O_NAMEDATTR,00) ERR#22 'Invalid argument' in FreeBSD 15.0

From: Aurélien_Couderc <aurelien.couderc2002_at_gmail.com>
Date: Fri, 09 Jan 2026 10:52:02 UTC
On Wed, Jan 7, 2026 at 12:29 AM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Tue, Jan 6, 2026 at 9:44 AM Aurélien Couderc
> <aurelien.couderc2002@gmail.com> wrote:
> >
> > openat(3,".",O_RDONLY|O_NAMEDATTR,00) returns ERR#22 'Invalid
> > argument' in FreeBSD 15.0/zfs root pool.
> >
> > Does anyone know why?
> For named attributes to work, the zfs xattr property must be set to "dir",
> which is not the default. Try:
> # zfs get xattr <whatever-zfs-calls the root fs?>
> - If it isn't "dir", then
> # zfs set xattr=dir <whatever-zfs-calls the root fs?>
> (I've never set up a ZFS root fs, so I don't know what it gets called;-)
>
> If it is set to "dir", then try some stuff with the "runat" command
> to see how that behaves. (I did a trivial test of bash and it did
> seem to work, but I mostly test "runat".)

That solved the problem. Thank you

Aurélien
-- 
Aurélien Couderc <aurelien.couderc2002@gmail.com>
Big Data/Data mining expert, chess enthusiast