[BUG] Inode size and allocated-block metadata ignore format feature semantics #19

Closed
opened 2026-10-02 04:38:55 +02:00 by erikinkinen · 1 comment
Owner

Summary

Inode decoding treats huge-file allocation counts as sectors even when the inode flag selects filesystem blocks. Metadata writes can preserve that flag while encoding sector counts, and large-file growth omits required filesystem feature metadata.

Reproduction

With the filesystem huge-file feature, a 4,096-byte block and inode flag 0x00040000, encode an allocation count of one. The affected reader returns one sector instead of eight. Also grow an original regular file beyond 2 GiB on media lacking the large-file feature.

Expected and actual behavior

Normalize allocation counts to sectors, encode matching units and publish required representation features within the same transaction. The affected helpers misinterpret counts and update size without the required superblock feature.

Environment and identity

Affected source: 2007c3bd, Integration graph 770e4e81. The original inode and superblock remain under their existing mount/transaction owner. This is a source and fixture finding; no boot-image reproduction is claimed. Last known working revision is unknown.

Evidence and prior checks

The inode format specifies allocation units and feature-dependent fields. Independent controls cover literal counts, flags, identity/checksums, format limits and journal interruption.

Tracking

Correction: #47.

## Summary Inode decoding treats huge-file allocation counts as sectors even when the inode flag selects filesystem blocks. Metadata writes can preserve that flag while encoding sector counts, and large-file growth omits required filesystem feature metadata. ## Reproduction With the filesystem huge-file feature, a 4,096-byte block and inode flag `0x00040000`, encode an allocation count of one. The affected reader returns one sector instead of eight. Also grow an original regular file beyond 2 GiB on media lacking the large-file feature. ## Expected and actual behavior Normalize allocation counts to sectors, encode matching units and publish required representation features within the same transaction. The affected helpers misinterpret counts and update size without the required superblock feature. ## Environment and identity Affected source: [2007c3bd](https://git.erikinkinen.fi/erix/e2fsd/commit/2007c3bdb8494ed75f5c8e42eee11950100fda76), Integration graph [770e4e81](https://git.erikinkinen.fi/erix/integration/commit/770e4e8166a0938d9dd2907624df99e9c9de5dbc). The original inode and superblock remain under their existing mount/transaction owner. This is a source and fixture finding; no boot-image reproduction is claimed. Last known working revision is unknown. ## Evidence and prior checks The [inode format](https://www.kernel.org/doc/html/latest/filesystems/ext4/inodes.html) specifies allocation units and feature-dependent fields. Independent controls cover literal counts, flags, identity/checksums, format limits and journal interruption. ## Tracking Correction: [#47](https://git.erikinkinen.fi/erix/e2fsd/pulls/47).
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:47 +01:00
Author
Owner

The correction is ready in #47, including the independent format boundaries and interrupted original-journal controls. The issue remains open until the change is merged.

The correction is ready in [#47](https://git.erikinkinen.fi/erix/e2fsd/pulls/47), including the independent format boundaries and interrupted original-journal controls. The issue remains open until the change is merged.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/e2fsd#19
No description provided.