Skip to content

erofs-utils: preserve and reserve plain xattr prefixes

bingying lan linux-erofs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3erofs-utils: lib: initialize xattr prefix buffer cleanup before errorslib/xattr.c+1 -20 replies
2/3erofs-utils: mkfs: preserve plain xattr prefixes in incremental buildsinclude/erofs/xattr.h lib/xattr.c man/mkfs.erofs.1 +1 more+226 -20 replies
3/3erofs-utils: mkfs: add opt-in plain xattr prefix reservationsinclude/erofs/internal.h include/erofs/xattr.h include/erofs_fs.h +3 more+165 -270 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] erofs-utils: preserve and reserve plain xattr prefixes

Incremental builds must preserve the prefix indices referenced by inherited inodes. Replacing the base prefix table with the current command-line list can change those indices. Rewriting an unchanged table is also unnecessary and may fail once the image exceeds the prefix-table address limit.

Patch 1 fixes buffer-head cleanup when writing a prefix table fails. Patch 2 preserves every base prefix slot, appends newly requested prefixes, and reuses an unchanged plain table. It also preserves and remaps the inode digest prefix configuration.

Patch 3 adds --xattr-prefix-reserve to allocate an optional 64 KiB region for future prefix additions. Later incremental builds can append records there without relocating the table. This proposes a new compat feature bit without changing prefix record encoding. Feedback on the flag and reservation design would be appreciated; patches 1 and 2 can be considered separately from this extension.

The series was built and passed local regression tests covering inherited prefix IDs, digest-prefix handling, unchanged-table reuse beyond 16 GiB, table writes around 4 GiB, reservation allocation and migration, packed table handling, and clean failure on prefix offset overflow. Reservation checks covered 512-byte and 4 KiB blocks, compressed data, and shared xattrs. The local test scripts are not included in this series.

This series is based on erofs-utils dev at de2dbe430f06.

Thanks,
bingying lan

bingying lan (3):
erofs-utils: lib: initialize xattr prefix buffer cleanup before errors
erofs-utils: mkfs: preserve plain xattr prefixes in incremental builds
erofs-utils: mkfs: add opt-in plain xattr prefix reservations

 include/erofs/internal.h |   1 +
 include/erofs/xattr.h    |  12 ++
 include/erofs_fs.h       |   2 +
 lib/xattr.c              | 291 +++++++++++++++++++++++++++++++++++++--
 man/mkfs.erofs.1         |  49 +++++++
 mkfs/main.c              |  40 +++++-
 6 files changed, 378 insertions(+), 17 deletions(-)

base-commit: de2dbe430f066ab02d7272e6b47fcc70446bca61

Signature · 1 line
2.53.0.apsara