erofs-utils: lib: refactor extended attribute name prefixes

Previously, the extended attribute name in `struct xattr_item` was
actually the part with the matched prefix stripped, which makes it
clumsy to strip or delete a specific attribute from one file.

To fix this, make the complete attribute name stored in xattr_item.
One thing worth noting is that the attribute name in xattr_item has a
trailing '\0' for ease of name comparison, while the trailing '\0' will
get stripped when writing to on-disk erofs_xattr_entry.

Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230913031804.84819-1-jefflexu@linux.alibaba.com
1 file changed