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

main: ignore EOVERFLOW when copying xattrs #352

Merged
merged 1 commit into from
Jun 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,11 @@ copy_xattr (int sfd, int dfd, char *buf, size_t buf_size)

s = safe_read_xattr (&v, sfd, it, 256);
if (s < 0)
return -1;
{
if (errno == EOVERFLOW)
Copy link
Contributor

@flouthoc flouthoc Jun 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small doubt/question: should this only ignore when buf contains security.capabilities and not for all the attributes since EOVERFLOW could also mean subsystem incompatibility for other xattrs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoud we at least write a debug log on this situation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code is used only when we copyup a file. If a xattr cannot be accessed because of EOVERFLOW, I think we should not error out in any case.

We could add a debug message, but I don't think it is going to be very helpful. Log messages from fuse-overlayfs are lost unless it is started manually with --debug.

continue;
return -1;
}

if (fsetxattr (dfd, it, v, s, 0) < 0)
{
Expand Down