On Thu, Jun 19, 2025 at 04:53:08PM +0200, Johannes Wiesböck wrote:
> Hello everyone,
> 
> while experimenting with large values for extended file attributes, i
> noticed that in bcachefs, i can only set xattrs up to a size of around
> 2KB. This size is limited by a check in bch2_xattr_set that ensures that
> the combined bkey+name+value size does not exceed
> U8_MAX*sizeof(u64)=2040B, which would overflow the bkey's maximum size.
> Therefore, the xattr size seems to be always limited by the maximum size
> of the bkey.
> 
> Is there a way in bcachefs that allows setting xattrs larger than the
> aforementioned 2KB? For comparison, ext4 provides the EA_INODE feature,
> that allows you to store xattrs in a dedicated inode and, thus use the
> full 64KB xattr size allowed by the kernel. Is something similar
> available/planned/imaginable in bcachefs?

We do want that at some point, yes. Would be happy to take patches and
provide some guidance, but we need to wait for debugging and
stabilization to settle down before I want to devote attention to that
sort of thing.

Reply via email to