2

What is actual max allowed size of btrfs xattr? I tried to test this on few systems and got entirely different results (between 11kB and 15kB) so I'm not sure what actually determines this size and whether I'm able to verify it before assignment? (other than brute force binary search)

1 Answer 1

5

From man xattr both kernel and filesystem can limit the maximum number/size xattr

grep XATTR /usr/include/linux/limits.h #define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */ #define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */ #define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */ 

For btrfs

In the Btrfs, XFS, and Reiserfs filesystem implementations, there is no practical limit on the number of extended attributes associated with a file, and the algorithms used to store extended attribute information on disk are scalable

And

In the Btrfs filesystem implementation, the total bytes used for the name, value, and implementation overhead bytes is limited to the filesystem nodesize value (16 kB by default).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.