Skip to content

fs: allocate large buffer to avoid attr size check#23

Merged
lgarrison merged 1 commit intomainfrom
halve-xattr-calls
Jan 1, 2026
Merged

fs: allocate large buffer to avoid attr size check#23
lgarrison merged 1 commit intomainfrom
halve-xattr-calls

Conversation

@alexdotc
Copy link
Copy Markdown
Member

@alexdotc alexdotc commented Jan 1, 2026

This halves the number of xattr calls by allocating a buffer of 64 bytes, which should be (more than) sufficient for all attrs we're checking across all directories on ceph.

I also switched to a fized-size stack array, but honestly it probably doesn't matter that much; it works with a vec if we move the buf.set_len() call further down the unsafe block so that we can use the return value of lgetxattr.

@alexdotc alexdotc linked an issue Jan 1, 2026 that may be closed by this pull request
@alexdotc alexdotc requested a review from lgarrison January 1, 2026 19:47
Copy link
Copy Markdown
Member

@lgarrison lgarrison left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@lgarrison lgarrison merged commit d6156d8 into main Jan 1, 2026
2 checks passed
@lgarrison lgarrison deleted the halve-xattr-calls branch January 1, 2026 20:02
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.

improvements to syscalls and large directory handling

2 participants