[FEATURE] Complete original-description resizing and durable synchronization #28

Closed
opened 2026-10-02 02:40:59 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Build tools require truncate/ftruncate, sparse growth and fsync/fdatasync on ordinary retained file descriptions. Existing resizing uses a dedicated sealed grant or conditional Open; original-device barriers and FAT catalog/undo durability already exist. The complete original-device/filesystem ordering and compatibility consumers are now implemented, with authored controls and execution waived.

Proposed behavior and scope

Implement directory-relative/path truncation through the original root/cwd/dirfd scope and ftruncate through the existing shared description. Preserve exact size, access ceilings, metadata freshness, alias positions, sparse zero growth, ENOSPC and original cleanup. Add fsync/fdatasync on retained regular-file/directory descriptions with explicit supported/refused filesystem guarantees. Native object identity, not a path recovered after admission, selects every effect.

Use original block-device persistence guarantees throughout ext journal commit/recovery and FAT catalog/undo completion. Keep a complete ext metadata operation within one committed transaction even when several descriptors are necessary. Refuse unsupported durability before effects; retain fail-stop state after uncertain publication. RAM synchronization completes its volatile consistency boundary without claiming power-loss persistence.

Authority, security and reliability

Define exact versioned compatibility/native requests and typed outcomes with the original held object, scope, generation and request key. No new ambient discovery, global sync interface, device grant or mount-selection shortcut. Reuse existing native caller ownership, authenticated client admission and shared-description exclusion. Preserve correlation, cancellation and final retirement; interruption cannot replay an uncertain effect or expose descriptor reuse before cleanup.

The JBD2 format specification defines descriptor/data and final commit framing. EriX implementation and fixtures remain original. Ordered durability must cover the actually selected filesystem and journal routes, including separately selected external journal storage.

Acceptance criteria

Checklist
  • Complete filesystem persistence boundaries and recovery ordering on original supported devices, including ext multi-descriptor atomic commit and selected FAT metadata.
  • Implement path/fd truncation and sparse growth with original description lifetime, exact size/ENOSPC outcomes and unchanged alias cursors.
  • Implement fsync/fdatasync through retained descriptions with explicit object/type/access policy, correlated completion, interruption, cancellation and cleanup.
  • Author independent provider, wire, actual serving and native workload controls for concurrency, resource limits, malformed input, failures, restart and original retirement.
  • Audit authority and code size, refactor duplication, document inline/component/manual contracts and publish a coherent signed immutable graph with linked issue/review/master reconciliation.

Author volatile-versus-persisted device models and fail-at-each-boundary controls; verify no partial committed operation, no early journal clearing, original-route barriers and no success on unsupported persistence. Add real VM compatibility workloads for all selected providers and full success/cleanup gates. Tests, builds, lint checks, generated documentation, VM/profiler execution and CI observation are currently deferred by the maintainer. Both complete EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Compatibility truncate and sync — implemented, 2 October 2026

Names, numeric identifiers and credentials grant no new device, mount or endpoint authority.

One shared control mapper admits complete capacity, correlates original object/command/argument/persistence, and preserves exact native refusal domains. Definite refusal permits later use without automatic retry.

Current-minor fixtures and error-precedence restoration are corrected; repeated rejection arrays are simplified.

No executed conformance, warning-free build, measured speedup or complete system security acceptance is claimed.

Phase completion is 19.44% weighted, 8.01% whole acceptance: 28/460 parents and 489/949 children. Both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed. Complete libc entry points and subsequent filesystem/compatibility features remain open.

Existing unsupported policy and encrypted-inline refusals remain documented.

No executed conformance, algorithmic security acceptance, warning-free build or measured speedup is claimed.

Compatibility truncate/ftruncate/fsync/fdatasync serving and complete workload controls remain open in the owning feature. Phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Transport or cleanup uncertainty terminates before ordinary storage reuse; request identifiers never wrap. Master material is guarded across partial lookup errors, invalid length, identifier refusal and successful derivation.

They cover storage boundaries, success/refusal cleanup, borrowed response address and width, malformed/padded frames, sequence exhaustion, original request encoding, exact correlation, unexpected receipts and master admission exits.

Encrypted allocation/growth and compatibility truncate/ftruncate/fsync/fdatasync remain open in the owning feature. Phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children.

Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Twelve independent original-media/native controls are authored and unrun, covering literal allocation bits and counters, retained data, both gap neighbors, unwritten fragments, external leaves, rejected inconsistent identity, final logical boundaries, wide geometry, maximum-leaf continuation and every original journal barrier with recovery.

Encrypted allocation/growth, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in the owning feature. Phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Required large/huge-file metadata joins the same original superblock and complete transaction as the inode.

Encrypted allocation/growth, complete bigalloc boundary audit, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in the owning feature. Phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Absent blocks and unwritten runs require no data I/O or allocation.

General large-file growth admission, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in the owning feature. Phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Invalid ranges and malformed encodings still refuse; constructed outputs are preflighted.

General large-file growth admission, sparse-gap optimization, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in the owning feature. Phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed.

VFS requires frozen Write for regular-file resize and live admitted file/directory custody for sync. Known refusals preserve original admission; uncertainty keeps cleanup-only custody, with no retry or pathname reopen.

No request or adapter adds a device, mount, credentials, new native rights or capability transfer.

They cover literal framing, unchanged output on refusal, full correlation, access direction, actual aliases and zero growth, storage/format refusal, clean recovery ownership, lost barriers/replies, retained cleanup and short reply capacity.

Existing ext logical-range conversions and sparse-gap traversal still need the size-boundary audit; compatibility truncate/ftruncate/fsync/fdatasync consumers, complete cancellation controls and new live workloads remain unfinished. Current phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children.

Both full guest EriX generations and external Rust/LLVM rebuilding remain required and unperformed.

Retained file-control contract

Native resize and synchronization use one disjoint retained-candidate operation family with complete request/object/command/argument correlation. Resize retains the full native unsigned size; compatibility admits signed offsets before submission. A private timestamp suffix is allowed only for resize. No request supplies a pathname, device, mount, credential, new right or transferred capability.

Resize requires original admitted Write on a regular file. Synchronization accepts a live admitted regular file or directory in either access direction; it grants no data access and changes no cursor or timestamp. Data-only synchronization may complete with the stronger whole-file guarantee. Replies distinguish definite storage exhaustion, representation limits, unsupported guarantees, known refusal and uncertain effects. Known refusals preserve the original owner; uncertainty permits cleanup only and never automatic resubmission.

RAM explicitly reports volatile completion. Selected transactional ext and FAT report persistence only through their original mounted filesystem and journal owners, with barriers on those exact devices. Unsupported imported or unjournaled paths must refuse that promise. Aliases, unlink/name reuse, cancellation and lost replies retain the original description and operation owner. Compatibility path truncate will reuse native acquisition and retire its temporary owner without consuming a public descriptor.

The Open Group function specifications define the behavioral baseline: ftruncate, fsync and fdatasync. This is the implementation contract; compatibility serving and complete authored controls remain unfinished.

Alternatives and tradeoffs

A queued-write acknowledgement cannot establish persistence. Limiting a complete operation to one descriptor would add an artificial restriction; descriptor chaining should use actual admitted journal space. Whole-device discovery, pathname reacquisition and replay after uncertain effects would violate original authority and lifetime.

Tracking and rollout

Retain current namespace/lifetime behavior and immutable source selection. Evolve producers, consumers and VM clients together. Remove redundant adapters only after all users migrate; current dedicated grant behavior must stay explicit until retirement is justified. No source acceptance implies a test pass.

Original namespace, retained native resolution, original device barriers, FAT metadata, ext review, compatibility review, Integration review, phase completion.

Original filesystem persistence — signed source acceptance, 2 October 2026

Compatibility truncate/ftruncate and fsync/fdatasync serving, its complete native workloads and full-item acceptance remain open in retained-description persistence.

They separate volatile/persisted bytes and cover writer and full/fast-recovery interruption boundaries, lost replies, partial checkpoints, original routes, capacity/refusal, checksum dialects, wrapped descriptors and identities, later revocations, imported superblocks and actual clock-free file operations.

Source acceptance is not an executed persistence result, warning-free build or measured speedup. Both full EriX guest generations and external Rust/LLVM rebuilding in EriX remain required and unperformed.

Phase progress is 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children.

Related records and contracts
Repository Links
docs PR 4
e2fsd issue 17, issue 18, issue 19, encrypted-file-growth.md, extent-boundaries.md
fatd PR 3
lib-aes PR 2
lib-constant-time PR 2
lib-fs-crypto PR 2
lib-ipc PR 2
lib-posixabi PR 3
lib-sha2 PR 2
posixd file-controls.md
ramfsd PR 2
vfsd PR 3
## Problem and motivation Build tools require truncate/ftruncate, sparse growth and fsync/fdatasync on ordinary retained file descriptions. Existing resizing uses a dedicated sealed grant or conditional Open; original-device barriers and FAT catalog/undo durability already exist. The complete original-device/filesystem ordering and compatibility consumers are now implemented, with authored controls and execution waived. ## Proposed behavior and scope Implement directory-relative/path truncation through the original root/cwd/dirfd scope and ftruncate through the existing shared description. Preserve exact size, access ceilings, metadata freshness, alias positions, sparse zero growth, ENOSPC and original cleanup. Add fsync/fdatasync on retained regular-file/directory descriptions with explicit supported/refused filesystem guarantees. Native object identity, not a path recovered after admission, selects every effect. Use original block-device persistence guarantees throughout ext journal commit/recovery and FAT catalog/undo completion. Keep a complete ext metadata operation within one committed transaction even when several descriptors are necessary. Refuse unsupported durability before effects; retain fail-stop state after uncertain publication. RAM synchronization completes its volatile consistency boundary without claiming power-loss persistence. ## Authority, security and reliability Define exact versioned compatibility/native requests and typed outcomes with the original held object, scope, generation and request key. No new ambient discovery, global sync interface, device grant or mount-selection shortcut. Reuse existing native caller ownership, authenticated client admission and shared-description exclusion. Preserve correlation, cancellation and final retirement; interruption cannot replay an uncertain effect or expose descriptor reuse before cleanup. The [JBD2 format specification](https://www.kernel.org/doc/html/latest/filesystems/ext4/journal.html) defines descriptor/data and final commit framing. EriX implementation and fixtures remain original. Ordered durability must cover the actually selected filesystem and journal routes, including separately selected external journal storage. ## Acceptance criteria <details> <summary>Checklist</summary> - [x] Complete filesystem persistence boundaries and recovery ordering on original supported devices, including ext multi-descriptor atomic commit and selected FAT metadata. - [x] Implement path/fd truncation and sparse growth with original description lifetime, exact size/ENOSPC outcomes and unchanged alias cursors. - [x] Implement fsync/fdatasync through retained descriptions with explicit object/type/access policy, correlated completion, interruption, cancellation and cleanup. - [x] Author independent provider, wire, actual serving and native workload controls for concurrency, resource limits, malformed input, failures, restart and original retirement. - [x] Audit authority and code size, refactor duplication, document inline/component/manual contracts and publish a coherent signed immutable graph with linked issue/review/master reconciliation. Author volatile-versus-persisted device models and fail-at-each-boundary controls; verify no partial committed operation, no early journal clearing, original-route barriers and no success on unsupported persistence. Add real VM compatibility workloads for all selected providers and full success/cleanup gates. Tests, builds, lint checks, generated documentation, VM/profiler execution and CI observation are currently deferred by the maintainer. Both complete EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed. ### Compatibility truncate and sync — implemented, 2 October 2026 Names, numeric identifiers and credentials grant no new device, mount or endpoint authority. One shared control mapper admits complete capacity, correlates original object/command/argument/persistence, and preserves exact native refusal domains. Definite refusal permits later use without automatic retry. Current-minor fixtures and error-precedence restoration are corrected; repeated rejection arrays are simplified. No executed conformance, warning-free build, measured speedup or complete system security acceptance is claimed. Phase completion is **19.44% weighted**, 8.01% whole acceptance: 28/460 parents and 489/949 children. Both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed. Complete libc entry points and subsequent filesystem/compatibility features remain open. Existing unsupported policy and encrypted-inline refusals remain documented. No executed conformance, algorithmic security acceptance, warning-free build or measured speedup is claimed. Compatibility truncate/ftruncate/fsync/fdatasync serving and complete workload controls remain open in [the owning feature](https://git.erikinkinen.fi/erix/posixd/issues/28). Phase completion remains **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed. Transport or cleanup uncertainty terminates before ordinary storage reuse; request identifiers never wrap. Master material is guarded across partial lookup errors, invalid length, identifier refusal and successful derivation. They cover storage boundaries, success/refusal cleanup, borrowed response address and width, malformed/padded frames, sequence exhaustion, original request encoding, exact correlation, unexpected receipts and master admission exits. Encrypted allocation/growth and compatibility truncate/ftruncate/fsync/fdatasync remain open in [the owning feature](https://git.erikinkinen.fi/erix/posixd/issues/28). Phase completion remains **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed. Twelve independent original-media/native controls are authored and unrun, covering literal allocation bits and counters, retained data, both gap neighbors, unwritten fragments, external leaves, rejected inconsistent identity, final logical boundaries, wide geometry, maximum-leaf continuation and every original journal barrier with recovery. Encrypted allocation/growth, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in [the owning feature](https://git.erikinkinen.fi/erix/posixd/issues/28). Phase completion remains **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed. Required large/huge-file metadata joins the same original superblock and complete transaction as the inode. Encrypted allocation/growth, complete bigalloc boundary audit, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in [the owning feature](https://git.erikinkinen.fi/erix/posixd/issues/28). Phase completion remains **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed. Absent blocks and unwritten runs require no data I/O or allocation. General large-file growth admission, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in [the owning feature](https://git.erikinkinen.fi/erix/posixd/issues/28). Phase completion remains **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed. Invalid ranges and malformed encodings still refuse; constructed outputs are preflighted. General large-file growth admission, sparse-gap optimization, compatibility truncate/ftruncate/fsync/fdatasync and complete live controls remain open in [the owning feature](https://git.erikinkinen.fi/erix/posixd/issues/28). Phase completion remains **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM guest rebuilding remain required and unperformed. VFS requires frozen Write for regular-file resize and live admitted file/directory custody for sync. Known refusals preserve original admission; uncertainty keeps cleanup-only custody, with no retry or pathname reopen. No request or adapter adds a device, mount, credentials, new native rights or capability transfer. They cover literal framing, unchanged output on refusal, full correlation, access direction, actual aliases and zero growth, storage/format refusal, clean recovery ownership, lost barriers/replies, retained cleanup and short reply capacity. Existing ext logical-range conversions and sparse-gap traversal still need the size-boundary audit; compatibility truncate/ftruncate/fsync/fdatasync consumers, complete cancellation controls and new live workloads remain unfinished. Current phase completion remains **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. Both full guest EriX generations and external Rust/LLVM rebuilding remain required and unperformed. ### Retained file-control contract Native resize and synchronization use one disjoint retained-candidate operation family with complete request/object/command/argument correlation. Resize retains the full native unsigned size; compatibility admits signed offsets before submission. A private timestamp suffix is allowed only for resize. No request supplies a pathname, device, mount, credential, new right or transferred capability. Resize requires original admitted Write on a regular file. Synchronization accepts a live admitted regular file or directory in either access direction; it grants no data access and changes no cursor or timestamp. Data-only synchronization may complete with the stronger whole-file guarantee. Replies distinguish definite storage exhaustion, representation limits, unsupported guarantees, known refusal and uncertain effects. Known refusals preserve the original owner; uncertainty permits cleanup only and never automatic resubmission. RAM explicitly reports volatile completion. Selected transactional ext and FAT report persistence only through their original mounted filesystem and journal owners, with barriers on those exact devices. Unsupported imported or unjournaled paths must refuse that promise. Aliases, unlink/name reuse, cancellation and lost replies retain the original description and operation owner. Compatibility path truncate will reuse native acquisition and retire its temporary owner without consuming a public descriptor. The Open Group function specifications define the behavioral baseline: [ftruncate](https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html), [fsync](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html) and [fdatasync](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html). This is the implementation contract; compatibility serving and complete authored controls remain unfinished. </details> ## Alternatives and tradeoffs A queued-write acknowledgement cannot establish persistence. Limiting a complete operation to one descriptor would add an artificial restriction; descriptor chaining should use actual admitted journal space. Whole-device discovery, pathname reacquisition and replay after uncertain effects would violate original authority and lifetime. ## Tracking and rollout Retain current namespace/lifetime behavior and immutable source selection. Evolve producers, consumers and VM clients together. Remove redundant adapters only after all users migrate; current dedicated grant behavior must stay explicit until retirement is justified. No source acceptance implies a test pass. [Original namespace](https://git.erikinkinen.fi/erix/posixd/issues/27), [retained native resolution](https://git.erikinkinen.fi/erix/vfsd/issues/16), [original device barriers](https://git.erikinkinen.fi/erix/blockd/issues/3), [FAT metadata](https://git.erikinkinen.fi/erix/fatd/issues/8), [ext review](https://git.erikinkinen.fi/erix/e2fsd/pulls/3), [compatibility review](https://git.erikinkinen.fi/erix/posixd/pulls/5), [Integration review](https://git.erikinkinen.fi/erix/integration/pulls/12), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). ### Original filesystem persistence — signed source acceptance, 2 October 2026 Compatibility truncate/ftruncate and fsync/fdatasync serving, its complete native workloads and full-item acceptance remain open in [retained-description persistence](https://git.erikinkinen.fi/erix/posixd/issues/28). They separate volatile/persisted bytes and cover writer and full/fast-recovery interruption boundaries, lost replies, partial checkpoints, original routes, capacity/refusal, checksum dialects, wrapped descriptors and identities, later revocations, imported superblocks and actual clock-free file operations. Source acceptance is not an executed persistence result, warning-free build or measured speedup. Both full EriX guest generations and external Rust/LLVM rebuilding in EriX remain required and unperformed. Phase progress is **19.20% weighted**, 7.61% whole acceptance: 27/460 parents and 486/949 children. <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | docs | [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | e2fsd | [issue 17](https://git.erikinkinen.fi/erix/e2fsd/issues/17), [issue 18](https://git.erikinkinen.fi/erix/e2fsd/issues/18), [issue 19](https://git.erikinkinen.fi/erix/e2fsd/issues/19), [encrypted-file-growth.md](https://git.erikinkinen.fi/erix/e2fsd/src/branch/feature/posix-compat/docs/encrypted-file-growth.md), [extent-boundaries.md](https://git.erikinkinen.fi/erix/e2fsd/src/commit/433a6e86bf50f79acb412c84ecf629d7561eefa3/docs/extent-boundaries.md) | | fatd | [PR 3](https://git.erikinkinen.fi/erix/fatd/pulls/3) | | lib-aes | [PR 2](https://git.erikinkinen.fi/erix/lib-aes/pulls/2) | | lib-constant-time | [PR 2](https://git.erikinkinen.fi/erix/lib-constant-time/pulls/2) | | lib-fs-crypto | [PR 2](https://git.erikinkinen.fi/erix/lib-fs-crypto/pulls/2) | | lib-ipc | [PR 2](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2) | | lib-posixabi | [PR 3](https://git.erikinkinen.fi/erix/lib-posixabi/pulls/3) | | lib-sha2 | [PR 2](https://git.erikinkinen.fi/erix/lib-sha2/pulls/2) | | posixd | [file-controls.md](https://git.erikinkinen.fi/erix/posixd/src/branch/feature/posix-compat/docs/file-controls.md) | | ramfsd | [PR 2](https://git.erikinkinen.fi/erix/ramfsd/pulls/2) | | vfsd | [PR 3](https://git.erikinkinen.fi/erix/vfsd/pulls/3) | </details>
erikinkinen 2026-10-02 06:27:49 +02:00
  • closed this issue
  • added the
    refactor
    label
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:07 +01:00
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/posixd#28
No description provided.