[BUG] Retained imported file aliases miss committed growth #15

Closed
opened 2026-10-12 16:33:05 +02:00 by erikinkinen · 1 comment
Owner

Summary

Growing an imported FAT-family file updates the writer's handle but leaves other retained handles with old allocation information. A size query through an acquired handle can then reject the provider's own successful write as a stale observation.

Reproduction

Create a file on the fixture medium without an EriX metadata catalog. Keep its writable handle, acquire a second handle to the same directory entry, then write fresh through the writer. Query the acquired handle's size and read the file through both handles.

The maintained reproduction runs on FAT and exFAT:

cargo test --all-targets --all-features size_observation_uses_original_entry_and_live_root

Expected and actual behavior

The acquired handle must report a length of five bytes, and the writer must read fresh. The affected candidate-size response returns IPC_RESULT_RETRY (6) instead of IPC_RESULT_OK (0). The refresh code updates the writer and handles sharing a nonzero catalog serial; imported aliases have no catalog serial and keep stale allocation and length fields.

Environment and identity

Affected: Fatd 21102ceb. Host fixtures supply writable FAT12 and exFAT media and keep both handles alive.

Evidence and prior checks

The fix matches imported aliases by the retained mount, entry location, and object kind. The FAT and exFAT size/read controls pass in CI run 288.

Tracking

Related: directory growth, Fatd PR 3, Phase 6. This report concerns imported file aliases; directory growth has separate handling.

## Summary Growing an imported FAT-family file updates the writer's handle but leaves other retained handles with old allocation information. A size query through an acquired handle can then reject the provider's own successful write as a stale observation. ## Reproduction Create a file on the fixture medium without an EriX metadata catalog. Keep its writable handle, acquire a second handle to the same directory entry, then write `fresh` through the writer. Query the acquired handle's size and read the file through both handles. The maintained reproduction runs on FAT and exFAT: ```sh cargo test --all-targets --all-features size_observation_uses_original_entry_and_live_root ``` ## Expected and actual behavior The acquired handle must report a length of five bytes, and the writer must read `fresh`. The affected candidate-size response returns `IPC_RESULT_RETRY` (`6`) instead of `IPC_RESULT_OK` (`0`). The refresh code updates the writer and handles sharing a nonzero catalog serial; imported aliases have no catalog serial and keep stale allocation and length fields. ## Environment and identity Affected: [Fatd 21102ceb](https://git.erikinkinen.fi/erix/fatd/commit/21102ceb51e926022baf4b2df802b01cce29c010). Host fixtures supply writable FAT12 and exFAT media and keep both handles alive. ## Evidence and prior checks [The fix](https://git.erikinkinen.fi/erix/fatd/commit/d6ecf8bd0ff045e125dbe99cfe77588d612dd6f3) matches imported aliases by the retained mount, entry location, and object kind. The FAT and exFAT size/read controls pass in [CI run 288](https://git.erikinkinen.fi/erix/fatd/actions/runs/288). ## Tracking Related: [directory growth](https://git.erikinkinen.fi/erix/fatd/issues/9), [Fatd PR 3](https://git.erikinkinen.fi/erix/fatd/pulls/3), [Phase 6](https://git.erikinkinen.fi/erix/integration/issues/65). This report concerns imported file aliases; directory growth has separate handling.
Author
Owner

Imported file aliases now refresh from their retained mount and entry identity after committed growth. Fixed in this commit.

Imported file aliases now refresh from their retained mount and entry identity after committed growth. Fixed in [this commit](https://git.erikinkinen.fi/erix/fatd/commit/d6ecf8bd0ff045e125dbe99cfe77588d612dd6f3).
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:00 +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/fatd#15
No description provided.