pingqiu 4ec7bd0c2e G5-5 instrumentation: SCSI handler + StorageBackend.Write entry
QA round 9 confirmed: even durable: write observer line is missing.
The iSCSI WRITE never reaches StorageBackend.writeBytes. Need to
walk further upstream — either the iSCSI handler isn't getting the
SCSI WRITE command, or it's getting it but using the wrong backend.

Add 6 instrumentation lines across two layers:

  core/frontend/iscsi/scsi.go (doWrite):
    - SCSI WRITE handler entry (fires on every WRITE_10/16 arrival)
    - SCSI WRITE rejected (LBA out of range)
    - SCSI WRITE rejected (short dataOut)
    - SCSI WRITE backend.Write FAILED
    - SCSI WRITE backend.Write ok

  core/frontend/iscsi/scsi.go (handleSCSI SYNC_CACHE branch):
    - SCSI SYNCHRONIZE_CACHE handler entry
    - SCSI SYNCHRONIZE_CACHE backend.Sync FAILED
    - SCSI SYNCHRONIZE_CACHE backend.Sync ok

  core/frontend/durable/storage_adapter.go (Write):
    - StorageBackend.Write entry (every Write call)
    - StorageBackend.Write gate-rejected (gate() returned err)

Disambiguation matrix for QA's next run:

  No 'iscsi: SCSI WRITE handler' line:
    → iSCSI session/login layer rejects command before SCSI handler.
       Check if Normal session established correctly; check whether
       initiator's volume sees the right size via READ_CAPACITY.

  iscsi: SCSI WRITE handler line present, but no
  durable: StorageBackend.Write entry:
    → SCSI handler reaches a DIFFERENT backend instance (not the
       observer-wired StorageBackend). Wiring fix in main.go required.

  iscsi: SCSI WRITE handler + durable: StorageBackend.Write entry,
  but no observer dispatch:
    → backend gate() rejected (closed/non-operational/lineage drift).
       gate-rejected line fires.

  All instrumentation fires through to ship/barrier:
    → Replication is working.

Tests still green: iscsi (30.9s), durable (0.5s), blockvolume (16.7s).

Refs: QA round 9 — observer line missing from upstream
instrumentation; need iSCSI-side disambiguation.
2026-04-27 01:06:57 -07:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%