Skip to content

fix(dgw): use statvfs for recording storage space on Unix#1730

Merged
Benoît Cortier (CBenoit) merged 4 commits intomasterfrom
DGW-355
Mar 27, 2026
Merged

fix(dgw): use statvfs for recording storage space on Unix#1730
Benoît Cortier (CBenoit) merged 4 commits intomasterfrom
DGW-355

Conversation

@CBenoit
Copy link
Copy Markdown
Member

Replaces the sysinfo disk-enumeration approach on Linux/macOS with a direct statvfs(2) call against the configured recording path. This fixes incorrect or missing space values for network filesystems (NFS, CIFS/Samba) and any mount point the previous heuristic could not resolve.

Issue: DGW-355

Replaces the sysinfo disk-enumeration approach on Linux/macOS with a
direct statvfs(2) call against the configured recording path. This fixes
incorrect or missing space values for network filesystems (NFS,
CIFS/Samba) and any mount point the previous heuristic could not resolve.

Issue: DGW-355
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

Updates Devolutions Gateway’s heartbeat recording-storage metrics on Linux/macOS by querying filesystem capacity directly for the configured recording path, improving correctness on network filesystems and hard-to-resolve mount layouts (DGW-355).

Changes:

  • Replaced Unix disk-space detection with a direct statvfs(2) call against the recording path.
  • Removed sysinfo/dunce dependencies previously used for disk enumeration/canonicalization heuristics.
  • Updated heartbeat tests to reflect supported vs unsupported platforms for space metrics.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
devolutions-gateway/src/main.rs Removes force-link imports for sysinfo/dunce after switching away from those dependencies.
devolutions-gateway/src/api/heartbeat.rs Implements Unix statvfs-based disk-space query for the recording path and adjusts platform expectations in tests/docs.
devolutions-gateway/Cargo.toml Drops sysinfo/dunce and adds Unix-only libc dependency for statvfs.
Cargo.lock Lockfile updates reflecting dependency changes.

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

@CBenoit Benoît Cortier (CBenoit) merged commit b5de812 into master Mar 27, 2026
47 checks passed
@CBenoit Benoît Cortier (CBenoit) deleted the DGW-355 branch March 27, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants