Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for extended attributes to pipe fuse #2848

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

tcibinan
Copy link
Contributor

@tcibinan tcibinan commented Sep 28, 2022

Resolves #2847.

The pull request brings support for extended attributes processing. At the moment extended attributes are stored as cloud data storage object native tags. Currently AWS S3 is only supported on Linux/MacOS.

Filter extended attributes

As long as extended attribute calls are very common on Linux/MacOS then it is important to keep their processing efficient. Currently the processing efficiency is reached by filtering out all non user attributes. Notice that by default only attributes with user prefix are processed. All other attributes are ignored.

# the commands below work fine
setfattr -n user.key -v value ~/storage/mount/file.txt
getfattr -n user.key ~/storage/mount/file.txt
getfattr ~/storage/mount/file.txt

# the commands below fail because extended attribute name doesn't start with "user"
setfattr -n another.key -v value ~/storage/mount/file.txt
getfattr -n another.key ~/storage/mount/file.txt

Configure extended attribute filters

Additional custom mount options can be used to tweak extended attributes filters.

# extended attributes with "user" prefix are supported
pipe storage mount -c "xattrs-include-prefix=user" ...

# extended attributes with "user" or "admin" prefixes are supported
pipe storage mount -c "xattrs-include-prefix=user,xattrs-include-prefix=admin" ...

# all extended attributes are supported
pipe storage mount -c "xattrs-include-prefix=*" ...

# extended attributes without "user" prefix are supported
pipe storage mount -c "xattrs-exclude-prefix=user" ...

# extended attributes without "user" or "admin" prefixes are supported
pipe storage mount -c "xattrs-exclude-prefix=user,xattrs-exclude-prefix=admin" ...

# no extended attributes are supported
pipe storage mount -c "xattrs-exclude-prefix=*" ...

Disable file system operations

Support for certain file system operations disabling has been also introduced.

pipe storage mount -c "disabled-operation=listxattr,disabled-operation=setxattr,disabled-operation=removexattr" ...

@tcibinan tcibinan requested review from mzueva and ekazachkova and removed request for mzueva and ekazachkova September 28, 2022 08:23
@mzueva mzueva merged commit db674a3 into develop Sep 30, 2022
tcibinan added a commit that referenced this pull request Oct 3, 2022
sidoruka pushed a commit that referenced this pull request Oct 4, 2022
sidoruka pushed a commit that referenced this pull request Oct 11, 2022
(cherry picked from commit 4bcbd49)
(cherry picked from commit 6c41eec)
mzueva pushed a commit that referenced this pull request Oct 19, 2023
(cherry picked from commit 4bcbd49)
(cherry picked from commit 6c41eec)
sidoruka pushed a commit that referenced this pull request Apr 4, 2024
(cherry picked from commit 4bcbd49)
(cherry picked from commit 6c41eec)
(cherry picked from commit adf03f1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce extended attributes support in pipe fuse
2 participants