tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: getextattr system.test != getextattr system test



On Thu, Mar 23, 2023 at 12:51:35PM +0100, Manuel Bouyer wrote:
> hello,
> trying to set up glusterfs on NetBSD I ran into issues with extended attributes
> (on a FFSv2ea). Basically glusterfs tries to setup attributes in the
> trusted namespace, and if I undertood it properly it does so using
> getextattr(1) & friends. The error message is:
> Staging of operation 'Volume Create' failed on localhost : Failed to set extended attributes trusted.glusterfs.volume-id, reason: Attribute not found 
> 
> So I tested from command line:
> #setextattr system test blash /data/glfs1/vol0
> # getextattr system test /data/glfs1/vol0
> /data/glfs1/vol0        blash
> # getextattr system.test /data/glfs1/vol0
> getextattr: /data/glfs1/vol0: failed: Attribute not found
> 
> from getextattr's man page, I understand that getextattr system test and
> getextattr system.test should be equivalent. But actually
> "getextattr system test" tries to read attribute test in namespace system,
> while "getextattr system.test" tries to read attribue system.test in
> namespace system.
> 
> Is it the expected behavior (i.e. did I misinterpret the man page) ?
> Or should getextattr strip the namespace component in the second use
> case ?

After more investigation is appears that my glusterfs issue isn't related
(I was wrong saying it uses *extattr(1): is uses the syscalls), there
is a kernel bug, more on this later.

Back to system test vs system.test: I think it's intended.
Both system.test and trusted.test points to the same namespace in our
implementation, and if we strip the namespace from the name then
system.test and trusted.test would point to the same object, which is not
expected.
So was is expected is: "system.test" and "system system.test" are the same.
This is how the FFSv2ea implementation behaves too.

The man page probably needs some clarification.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index