bcachefs xattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kent,

Seems the max length of xattr name+value is only 2004 bytes.
Why the limit of U8_MAX below?

root@bee:~# dd if=/dev/zero bs=1 count=1996 2>/dev/null | attr -s "long_attr" /mnt/test/attr.txt
attr_set: Numerical result out of range
Could not set "long_attr" for /mnt/test/attr.txt

183 int bch_xattr_set(struct inode *inode, const char *name,
...

230                 if (value) {
231                         struct keylist keys;
232                         struct bkey_i_xattr *xattr;
233                         unsigned u64s = BKEY_U64s +
234                                 DIV_ROUND_UP(sizeof(struct bch_xattr) +
235                                              qname.len + size,
236                                              sizeof(u64));
237 
238                         if (u64s > U8_MAX) {
239                                 ret = -ERANGE;
240                                 break;
241                         }

--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux