Repository navigation
Fix PBS filesystem durability, tier enumeration and interrupted movement recovery - #209
Merged
Merged
Conversation
Add an explicit MOVE_COMPLETE acknowledgement after source unlink and directory fsync. Keep switched state until cleanup succeeds, reject stale or premature acknowledgements, and allow repeat moves without eviction or remount. Cover worker cleanup errors and repeated live kernel movement with a held descriptor.
Linux 6.18 leaves the lower parent locked on mkdir error; 6.19 and newer consume the dentry and unlock it. Normalize this in the compatibility helper and remove the materialization path's double unlock. Add an ENOSPC regression for both parent materialization and direct mkdir followed by lookups and write recovery. The old module hung the regression; the fixed module passes on Linux 7.2.11, with both 6.18 and 7.2 builds checked.
Run merged-directory traversal with the same privileged backing credentials as lookup, preserving upper DAC checks. Caller credentials silently hid spill-tier snapshots below private backing parents from PBS, letting verification skip them and GC delete their live chunks. Propagate contributing-tier traversal/read errors instead of returning a partial listing. Cover UID 1000, bind mounts, upper DAC denial, and lookup-error propagation.
Persist full-sync intent before the first kernel transition. Recover using live placement, durable cleanup and sequence-guarded completion or rollback; instantiate persisted names when the recovery index is cold after reboot. Keep uncertain or failed acknowledgements pending instead of reporting placed.
A stacked syncfs barrier must flush lower address spaces, not just SmoothFS metadata. Synchronize each distinct lower superblock and preserve the first reported error. Add a real XFS delayed-allocation regression that fails on the old callback and passes after the lower flushes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PBS failure testing exposed filesystem durability and movement bugs that could lose manifests/chunks or leave objects unable to move again. This change implements merged-directory fsync, flushes every backing filesystem on syncfs, prevents inode-reuse corruption, serializes repeated movement through durable completion/rollback acknowledgements, preserves enumeration across backing-tier permissions, and fixes mkdir error cleanup on supported kernels.
Startup recovery now persists intent before planning and reconciles interrupted work against live kernel placement, including a cold post-boot OID index. It syncs cleanup before acknowledging completion or rollback and leaves uncertain recovery pending.
Validation: Go tests, race checks, vet/static/script/package checks, and kernel builds on Linux 6.18 and 7.2 passed. Real XFS-backed PBS tests covered four worker-exit phases, stale/invalid rollback guards, directory sync, inode reuse, ENOSPC, tier I/O failure during GC, corruption detection, repeated movement and forced power-off. The patched PBS candidate retained all 12 snapshots, 23 indexes and 391 referenced chunks through both full power-loss repeats; native CT/VM and file restores passed.
Merge with a merge commit so e85ea3a remains an ancestor of the release tag required by SmoothNAS package gating. Publishing a release and its Debian packages remains necessary before appliance shipment. No automatic review settings are changed.