File system fixes and optimizations#3057
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3057 +/- ##
==========================================
+ Coverage 84.56% 85.39% +0.82%
==========================================
Files 32 32
Lines 1458 1458
Branches 215 215
==========================================
+ Hits 1233 1245 +12
+ Misses 130 116 -14
- Partials 95 97 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I also replaced LinuxOSFileStore on FreeBsdFileSystem by correct class |
dbwiddis
left a comment
There was a problem hiding this comment.
Thanks for these fixes!
As we have a new API field and changed behavior on macOS, we definitely need a change log entry. PR title can be a bit more verbose to describe the fix.
A few comments.
oshi-core/src/main/java/oshi/software/os/linux/LinuxFileSystem.java
Outdated
Show resolved
Hide resolved
650ce05 to
1cd5230
Compare
📝 WalkthroughWalkthroughAdds a boolean locality flag to file store API and propagates local vs network determination through platform implementations, updating constructors, filtering logic, and file-store matching signatures across OS-specific classes. Changes
Sequence DiagramsequenceDiagram
participant Client as Caller
participant FS as FileSystem Implementation
participant STORE as OSFileStore
participant API as OSFileStore API
Client->>FS: getFileStores(localOnly)
activate FS
FS->>FS: iterate mounts
FS->>FS: determine isLocal = !NETWORK_FS_TYPES.contains(type)
alt localOnly && !isLocal
FS->>FS: skip mount
else
FS->>STORE: new ...OSFileStore(..., uuid, isLocal, ...)
activate STORE
STORE->>API: super(..., uuid, local)
API-->>STORE: initialized (local flag set)
STORE-->>FS: constructed
deactivate STORE
end
FS-->>Client: List<OSFileStore>
Client->>STORE: isLocal()
STORE-->>Client: boolean
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting Comment |
Delay name filtering on MacFileSystem.getFileStoreMatching to fix non-matching that could be found with DiskArbitration. Include local boolean on all OSFileStore objects. It is used to optimize updateAttributes() fileStore lookup.
1cd5230 to
05efe9e
Compare
|
You are the best @dbwiddis ! |
Delay name filtering on MacFileSystem.getFileStoreMatching to fix non-matching that could be found with DiskArbitration.
Include local boolean on all OSFileStore objects. It is used to optimize updateAttributes() fileStore lookup.
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
✏️ Tip: You can customize this high-level summary in your review settings.