erofs: fix long xattr name prefix placement
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 11 Sep 2025 19:27:11 +0000 (03:27 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 11 Sep 2025 19:37:07 +0000 (03:37 +0800)
commit1fcf686def19064a7b5cfaeb28c1f1a119900a2b
tree4f883e1384b376f24e155dc97aaef76ff9496297
parent181993bb0d626cf88cc803f4356ce5c5abe86278
erofs: fix long xattr name prefix placement

Currently, xattr name prefixes are forcibly placed into the packed
inode if the fragments feature is enabled, and users have no option
to put them in plain form directly on disk.

This is inflexible. First, as mentioned above, users should be able
to store unwrapped long xattr name prefixes unconditionally
(COMPAT_PLAIN_XATTR_PFX). Second, since we now have the new metabox
inode to store metadata, it should be used when available instead
of the packed inode.

Fixes: 414091322c63 ("erofs: implement metadata compression")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/erofs_fs.h
fs/erofs/internal.h
fs/erofs/xattr.c