Skip to content

Support more/larger xattrs? (now = "no space left on device") #127176

@pjotrek-b

Description

@pjotrek-b

Bug report

Bug description:

When trying to copy all embedded metadata key/value information from the IPTC standard-reference image, I get the following error:

[Errno 28] No space left on device: 'xattr-write-target-filename'

os.setxattr(target, prefix + strkey, strval.encode())

The total size of the exiftool-json is 15kB. More than 4k, but:

On kernel.org Wiki (ext4:xattrs), it says:

The paragraph is titled "Large Extended Attribute Values":

To enable ext4 to store extended attribute values that do not fit in the inode or in the single extended attribute block attached to an inode, the EA_INODE feature allows us to store the value in the data blocks of a regular file inode. This “EA inode” is linked only from the extended attribute name index and must not appear in a directory entry.

So I guess ext4 should be able to handle it?
My code works fine for writing shorter/less xattrs.

Does my blocksize matter? (512 bytes)
Is there any way to check what the limit is?
And which component in the stack actually decides this "out of diskspace" error?

Thank you very much in advance 😄
(PS: This was on Xubuntu 20.04.6 - python 3.8.10. Wasn't available in the dropdown)

CPython versions tested on:

3.8.10

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions