mkfs.erofs fails (failed to build shared xattrs, err 61)

Gao Xiang hsiangkao at linux.alibaba.com
Tue Mar 12 22:37:33 AEDT 2024



On 2024/3/12 19:07, Gael Donval wrote:
>> On 2024/3/12 18:44, Gao Xiang wrote:
>>> Hi Gael,
>>>
>>> On 2024/3/12 17:57, Gael Donval wrote:
>>>> Dear list,
>>>>
>>>>      $ mkdir foo && touch foo/bar && mkfs.erofs foo.erofs.img foo
>>>>      mkfs.erofs 1.7.1
>>>>      <E> erofs: failed to build shared xattrs: [Error 61] No data
>>>> available
>>>>      <E> erofs:     Could not format the device : [Error 61] No
>>>> data available
>>>> That is at a location backed by BTRFS (btrfs-progs v6.7.1) on
>>>> kernel 6.8.0.
>>>>
>>>> If I use a TMPFS-supported folder instead all goes well.
>>>>
>>>>
>>>> Of course (NB "-x-1"),
>>>>
>>>>      $ mkdir foo && touch foo/bar && mkfs.erofs -x-1 foo.erofs.img
>>>> foo
>>>>
>>>> also works but is not how mkfs.erofs is meant to work in the
>>>> general case.
>>>
>>> Thanks for your feedback.
>>>
>>> Currently I don't have some BTRFS environment, I could set up one
>>> later.
>>> Yet in parallel could you provide a full message of
>>> "strace mkfs.erofs -x-1 foo.erofs.img foo" on BTRFS too?
>>
>> sorry, I meant "strace mkfs.erofs foo.erofs.img foo"
> 
> Hi,
> 
> Here it is.
> 

The problem here is that BTRFS could extract their internal
xattrs ("inode properties") in their own namespace which
don't belong to the original file itself like:

XATTR_BTRFS_PREFIX "compression" -> btrfs.compression = zstd

I think I need to introduce something to formally ignore
these xattrs like: `--xattrs-exclude=pattern`:
https://www.gnu.org/software/tar/manual/html_node/Extended-File-Attributes.html

Thanks,
Gao Xiang

> Thanks for your help,
> Gaël
> 
> 


More information about the Linux-erofs mailing list