Skip to content

Remove some redundant IO syscalls#7828

Merged
achamayou merged 4 commits into
microsoft:mainfrom
eddyashton:speculative_redundant_syscalls
Apr 16, 2026
Merged

Remove some redundant IO syscalls#7828
achamayou merged 4 commits into
microsoft:mainfrom
eddyashton:speculative_redundant_syscalls

Conversation

@eddyashton
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 16, 2026 14:12
@eddyashton eddyashton requested a review from a team as a code owner April 16, 2026 14:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce redundant I/O syscalls in the async host ledger implementation by relying on atomic exclusive file creation and skipping an unnecessary truncate in some cases.

Changes:

  • Replace pre-create fs::exists() check with exclusive-create fopen(..., "x") and explicit EEXIST handling.
  • Skip truncate() during complete() when the ledger file is considered “fresh” (not from_existing_file).

Comment thread src/host/ledger.h
Comment thread src/host/ledger.h
@achamayou achamayou merged commit 515e2d6 into microsoft:main Apr 16, 2026
19 checks passed
@cjen1-msft cjen1-msft mentioned this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants