Skip to content

fix: gate statx dont-sync flag for loongarch64 musl - #209

Merged
JounQin merged 1 commit into
mainfrom
fix/loongarch64-musl-statx-flags
May 19, 2026
Merged

JounQin merged 1 commit into
mainfrom
fix/loongarch64-musl-statx-flags

Conversation

@JounQin

@JounQin JounQin commented May 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Avoid referencing AtFlags::STATX_DONT_SYNC on loongarch64-unknown-linux-musl, where rustix does not expose it.
  • Keep using STATX_DONT_SYNC on other Linux targets.

Test plan

  • cargo check --target loongarch64-unknown-linux-musl
  • cargo check --target riscv64gc-unknown-linux-musl
  • just ready

Summary by CodeRabbit

  • Bug Fixes
    • Improved file system metadata retrieval on Linux for enhanced platform compatibility, particularly for loongarch64 architecture environments.

Review Change Stack

Copilot AI review requested due to automatic review settings May 19, 2026 11:03
@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a590a411-6429-465e-ac83-ee722621730a

📥 Commits

Reviewing files that changed from the base of the PR and between 19e85b7 and 263e89f.

📒 Files selected for processing (1)
  • src/file_system.rs

📝 Walkthrough

Walkthrough

The FileSystemOs::metadata function on Linux now conditionally selects AtFlags for statx based on the target platform: loongarch64 on musl uses AtFlags::empty(), while other platforms use AtFlags::STATX_DONT_SYNC. The remaining statx handling and fallback logic remain unchanged.

Changes

Platform-specific statx flags for loongarch64/musl

Layer / File(s) Summary
Conditional AtFlags for statx invocation
src/file_system.rs
FileSystemOs::metadata now selects AtFlags conditionally based on the target: AtFlags::empty() for loongarch64 on musl, otherwise AtFlags::STATX_DONT_SYNC, before invoking rustix::fs::statx.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A fuzzy fix for loongarch's plight,
Where musl must sync flags just right,
Empty states for eastern shores,
While others sync through data stores,
One small conditional, precise and tight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and specifically describes the main change: gating the statx dont-sync flag specifically for the loongarch64 musl target.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/loongarch64-musl-statx-flags

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

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 adjusts Linux statx usage to avoid referencing rustix::fs::AtFlags::STATX_DONT_SYNC on loongarch64-unknown-linux-musl where that flag isn’t available, while preserving the existing STATX_DONT_SYNC behavior on other Linux targets.

Changes:

  • Adds a cfg-gated flags selection for the statx call on Linux.
  • Uses AtFlags::empty() for loongarch64 + musl, and AtFlags::STATX_DONT_SYNC everywhere else on Linux.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.11%. Comparing base (19e85b7) to head (263e89f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #209   +/-   ##
=======================================
  Coverage   93.11%   93.11%           
=======================================
  Files          21       21           
  Lines        4083     4084    +1     
=======================================
+ Hits         3802     3803    +1     
  Misses        281      281           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codspeed

codspeed Bot commented May 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 13 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing fix/loongarch64-musl-statx-flags (263e89f) with main (19e85b7)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@JounQin
JounQin merged commit e4e658c into main May 19, 2026
27 checks passed
@JounQin
JounQin deleted the fix/loongarch64-musl-statx-flags branch May 19, 2026 11:16
This was referenced May 19, 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.

2 participants