Skip to contentSkip to conversation

Return value of generic xattr operations

DISCUSSION Marco Stornelli 2 participants 3 messages Dec 26, 2010 – Dec 27, 2010 VFS

lore
Share & tools
lore
#0 lore raw

Hi,

is it right that generic_setxattr & co. return -EOPNOTSUPP if there is a namespace error? I mean, if the user try to set <my own namespace>.foo attribute, the return value should be -EINVAL, isn't it? Operation not supported means that extended attributes are not enabled or not implemented by the fs. The man pages are not much clear about this point. What do you think?

Marco

#1 lore raw
Quoted 5 lines · Marco Stornelli

Hi,

is it right that generic_setxattr & co. return -EOPNOTSUPP if there is a namespace error? I mean, if the user try to set <my own namespace>.foo attribute, the return value should be -EINVAL, isn't it? Operation not

Why?
There are multiple errors and only one can be returned.

Quoted 3 lines

supported means that extended attributes are not enabled or not implemented by the fs. The man pages are not much clear about this point. What do you think?

Olaf

#2 lore raw

Il 26/12/2010 22:15, Olaf van der Spek ha scritto:

Quoted 11 lines
Quoted 5 lines · Marco Stornelli

Hi,

is it right that generic_setxattr & co. return -EOPNOTSUPP if there is a namespace error? I mean, if the user try to set <my own namespace>.foo attribute, the return value should be -EINVAL, isn't it? Operation not

Why?
There are multiple errors and only one can be returned.

Ok, but at least it should be return the most important. Man page said:
"If extended attributes are not supported by the file system, or are disabled, errno is set to ENOTSUP.", but in this case this kind of error is not really matching with this sentence, because the extended attribute are supported by fs and they are enabled.

Marco