Files
acp/TODO.md
T
Samuel Cui a420324adb fix: close the two blockers the Linux review found
Both were invisible on Darwin: one needs a real Linux ENOSPC, the other needs
the command's own stderr.

- A non-linear target pre-allocates with fallocate, and a failure there was
  reported as a bare error: it never ran through mappingError, never aborted
  the device and never ended a linear target, unlike every neighbouring path.
  A volume that fills up after the disk-usage snapshot therefore reported a
  target that was "not written" instead of ErrTargetNoSpace. Classify it like
  the rest. TestFullVolumePreallocationReportsNoSpace pins it with a real
  ENOSPC on a small tmpfs (it fails on the previous revision), and
  TestNonLinearTargetOnRefusingDeviceReportsATargetFailure records that a
  device refusing fallocate reports its own refusal rather than claiming no
  space. The drain test now uses a linear target, which is the shape that
  actually queues buffers before the write fails.
- cmd/acp registered the progress bar and then the report collector, and a run
  keeps one event handler, so the bar received nothing: the command printed its
  construction frame and no update. Compose the two handlers in the command and
  pin it end to end (the new test fails on the previous revision). README now
  says a command that wants both composes them.
- item.go still promised that an empty Targets slice hashes the source; the
  default HashOff reads nothing. TESTING.md and TODO.md now describe the Linux
  suite that actually exists.
2026-09-19 16:41:25 +08:00

1.4 KiB

Open work

Review cmd/acp-rewrite on its own terms

The tool exists for a real operational need: after a ZFS pool gains vdevs, existing files keep their old block layout, so rewriting them spreads the data across the new topology. The v0.2.1 API reshape moved it onto the new surface as-is; it has never been reviewed on its own terms.

To settle: whether it stays a separate binary or becomes a subcommand of acp; its flag set (-dryrun, -state, -report, -report-indent, -ignore); the resumable state and report formats, now that a report must round-trip through encoding/json as a public document; hardlink-group handling and duplicate reporting; the rewrite order it uses for a linear or object-backed target; and whether the existing suite — rewriteFile, the state and report round trips, temporary-file cleanup and the resume run are covered — needs a real-device end-to-end case. It also needs a README section of its own: today README.md documents its report behaviour and AGENTS.md describes what it is for.

Platform verification still owed

Linux-specific runtime paths run on the isolated Linux acceptance host (go test for the Linux-only file, including the /dev/full and filled-tmpfs ENOSPC cases, O_NOATIME and its permission fallback, fallocate, madvise). Windows and FreeBSD stay compile-verified only until a runtime is available (mmap_other.go, signature_xattr_freebsd.go, Windows path ordering).