Page MenuHomeFreeBSD

fusefs: don't send the namespace during listextattr
ClosedPublic

Authored by asomers on Aug 15 2019, 9:25 PM.

Details

Summary

fusefs: don't send the namespace during listextattr

The FUSE_LISTXATTR operation always returns the full list of a file's
extended attributes, in all namespaces. There's no way to filter the list
server-side. However, currently FreeBSD's fusefs driver sends a namespace
string with the FUSE_LISTXATTR request. That behavior was probably copied
from fuse_vnop_getextattr, which has an attribute name argument. It's
been there ever since extended attribute support was added in r324620. This
commit removes it.

Test Plan

Tested on the command line with a libfuse-based fuse file system. Unit
tests adjusted.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

asomers created this revision.Aug 15 2019, 9:25 PM
cem added inline comments.Aug 16 2019, 2:56 AM
sys/fs/fuse/fuse_vnops.c
2313 ↗(On Diff #60856)

Don’t we have to filter in the vnop routine now to satisfy the VOP api?

asomers added inline comments.Aug 16 2019, 4:25 AM
sys/fs/fuse/fuse_vnops.c
2313 ↗(On Diff #60856)

Do you mean filter the list for the requested namespace? Yes, and we had to filter it before. There never was any kind of server-side filtration. Line 2322 performs the filtration.

cem accepted this revision.Aug 16 2019, 4:58 AM
cem added inline comments.
sys/fs/fuse/fuse_vnops.c
2313 ↗(On Diff #60856)

Do you mean filter the list for the requested namespace?

Yes.

Line 2322 performs the filtration.

Ah. It wasn't clear to me from the "convert" name that it also filtered for the chosen prefix. Thanks.

This revision is now accepted and ready to land.Aug 16 2019, 4:58 AM
This revision was automatically updated to reflect the committed changes.