Skip to content

linux drive selection + linux usb drive benchmark + drive space check - #211

Merged
jamesmarkchan merged 6 commits into
devfrom
bug/drive-sel
Aug 11, 2026
Merged

linux drive selection + linux usb drive benchmark + drive space check#211
jamesmarkchan merged 6 commits into
devfrom
bug/drive-sel

Conversation

@jamesmarkchan

@jamesmarkchan jamesmarkchan commented Aug 11, 2026

Copy link
Copy Markdown
Member

@jamesmarkchan
jamesmarkchan requested review from a team and a lite review from Copilot August 11, 2026 05:55
@jamesmarkchan jamesmarkchan self-assigned this Aug 11, 2026
@jamesmarkchan jamesmarkchan added the bug Something isn't working label Aug 11, 2026
@jamesmarkchan jamesmarkchan added this to the 1.0.0 - portal release milestone Aug 11, 2026
@jamesmarkchan jamesmarkchan changed the title Bug/drive sel linux drive sel + usb drive benchmark + drive space check Aug 11, 2026
@jamesmarkchan jamesmarkchan changed the title linux drive sel + usb drive benchmark + drive space check linux drive selection + linux usb drive benchmark + drive space check Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 focuses on improving Linux drive selection and USB-drive benchmarking reliability, addressing issues around drive enumeration, Direct I/O constraints on vfat/FAT32, SMART handling on USB, and pre-flight validation (space/access) before starting a benchmark.

Changes:

  • Enumerate Linux drives via /proc/mounts instead of File.listRoots(), and improve drive model display for USB by combining lsblk VENDOR+MODEL.
  • Make Direct I/O on Linux more robust by deriving an effective alignment from filesystem block size, and falling back to buffered I/O when Direct I/O fails.
  • Add pre-benchmark disk space checks with a safety margin and tighten transaction handling for benchmark persistence.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
jdm-core/src/main/java/jdiskmark/UtilOs.java Adds Linux mount enumeration and vendor+model lookup; adjusts bus type detection logic.
jdm-core/src/main/java/jdiskmark/Util.java Switches Linux drive model display to vendor+model.
jdm-core/src/main/java/jdiskmark/SelectDriveFrame.java Updates static import to the new DriveChecker.
jdm-core/src/main/java/jdiskmark/Sample.java Introduces Direct I/O retry/fallback behavior and centralizes effective alignment usage.
jdm-core/src/main/java/jdiskmark/Gui.java Adds early USB SMART gating with user messaging.
jdm-core/src/main/java/jdiskmark/DrivePanel.java Uses Linux mount enumeration for drive dropdown and improves mount selection logic.
jdm-core/src/main/java/jdiskmark/DriveChecker.java New helper for target directory validation and disk space pre-checks.
jdm-core/src/main/java/jdiskmark/DriveAccessChecker.java Removed in favor of DriveChecker.
jdm-core/src/main/java/jdiskmark/BenchmarkWorker.java Wraps autosave persistence in a try/catch with rollback.
jdm-core/src/main/java/jdiskmark/BenchmarkRunner.java Adds effective alignment resolution and uses config.testDir for environment mapping.
jdm-core/src/main/java/jdiskmark/Benchmark.java Hardens deleteAll() transaction handling (rollback on active transaction, rollback on failure).
jdm-core/src/main/java/jdiskmark/App.java Adds 32K sector alignment option and enforces disk space check before benchmark start.
jdm-core/docs/design.md Updates documentation reference from DriveAccessChecker to DriveChecker.
jdm-core/docs/benchmarks.md Adds detailed Linux/USB benchmarking notes (Direct I/O constraints, alignment behavior, SMART, model detection).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread jdm-core/src/main/java/jdiskmark/UtilOs.java
Comment thread jdm-core/src/main/java/jdiskmark/UtilOs.java Outdated
Comment thread jdm-core/src/main/java/jdiskmark/UtilOs.java
Comment thread jdm-core/src/main/java/jdiskmark/DrivePanel.java
Comment thread jdm-core/src/main/java/jdiskmark/DrivePanel.java
Comment thread jdm-core/src/main/java/jdiskmark/BenchmarkWorker.java
Comment thread jdm-core/src/main/java/jdiskmark/Gui.java Outdated
@jamesmarkchan
jamesmarkchan merged commit 29413ca into dev Aug 11, 2026
8 checks passed
@jamesmarkchan
jamesmarkchan deleted the bug/drive-sel branch August 11, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

2 participants