Added sync shell command to flush FS buffers - #610
Conversation
Co-authored-by: LSantha <LSantha@users.noreply.github.com>
|
/oc review You are reviewing a pull request for the orchestrator. Your final line must be exactly one of: Use "Verdict: request-changes" if the PR needs code changes. Use "Verdict: approve" only if the PR is correct and ready for the next orchestrator phase. |
🤖 Review: PR #610 — sync shell commandFindings
Verdict: request-changes |
|
/oc fix Address review feedback. |
- Fix mount point matching: select longest prefix (most specific) match - Fix root mount matching for paths like /var/log - Add null device guard in flushFileSystem - Print note when device-level flush is skipped (ApiNotFoundException) - Add description attribute to path argument in XML descriptor - Extract findMountPoint into testable public static method - Add unit tests for mount point matching logic (5 tests, all pass)
Addressed review feedbackChanges made
Testing
|
Addressed review feedbackChanges madeFinding 1: Mount point matching bug (SyncCommand.java:83-107)
Finding 2: Silent ApiNotFoundException (SyncCommand.java:114-128)
Finding 3: Missing description on path argument (org.jnode.fs.command.xml:66)
Finding 4: Unit tests (SyncCommandTest.java)
Testing
|
|
All 4 review findings addressed:
All 235 tests pass. Commit pushed to |
|
/oc review You are reviewing a pull request for the orchestrator. Your final line must be exactly one of: Use "Verdict: request-changes" if the PR needs code changes. Use "Verdict: approve" only if the PR is correct and ready for the next orchestrator phase. |
|
Review of PR #610 — sync shell command (post-fix) All 4 previous findings verified fixed:
Self-check: Java 1.6 compliant (no lambdas/diamond/multi-catch), LGPL header present, no debug prints, no comments added. Verdict: approve |
|
Agent review passed. Awaiting human approval via native GitHub PR Review UI. |



Implementation complete. Summary of changes:
Created:
fs/src/commands/org/jnode/fs/command/SyncCommand.javasyncwith no args: iterates all mount points, flushes each filesystemsync /path: finds the filesystem mounted at/under that path, flushes only itModified:
fs/descriptors/org.jnode.fs.command.xmlsyncalias and syntax entriesDesign note: The
FileSysteminterface lacksflush(), so the command uses two-level flushing:AbstractFileSystem.flush()for filesystem-level caches (when applicable), thenBlockDeviceAPI.flush()for the device-level cache that actually pushes data to the disk hardware. This covers all filesystem implementations.Closes #606
opencode session | github run