SCSI WRITE SAME
SCSI WRITE SAME applies a repeated logical-block pattern to a contiguous LBA range and can request unmapping when supported.
The host normally supplies one block rather than the complete repeated payload; zero-fill is only one possible use. LBPWS and LBPWS10 advertise variant-specific UNMAP support. [1]
UNMAP=1 does not prove reclamation: The cited reference's Table 252 permits writing when deallocation or anchoring is not performed. For WRITE SAME(16), NDOB=1 omits data-out; LBPRZ=010b selects the provisioning initialization pattern, not necessarily zeros. Protection-information rules also apply. [2]
A zero block count may select the remaining device range; WSNZ can forbid it. This is a destructive operation, not a capability probe. [1]
NDOB controls data-out, not the block count. At the pinned implementation, omitting NUM leaves one block even with NDOB enabled. A manual example placed under whole-device zeroing omits NUM; its placement does not change that default. [3] [1]
Relations
- related
- SCSI UNMAP, SCSI LBPRZ, Logical block provisioning status, NVMe Write Zeroes, Data sanitization
Advantages
- Repeated-block initialization can avoid transferring the complete range from the host. [1]
Limitations
Citations
- sg3_utils sg_write_same manual, pinned author commit 1929463554c5: description, NDOB, NUM and UNMAP
- Seagate SCSI Commands Reference Rev. M (June 2022), sections 3.77-3.79 and Table 252
- sg3_utils pinned source: DEF_WS_NUMBLOCKS, main option parsing and do_write_same encoding
Sources & caveats
- Version-scoped source synthesis; no device command or hardware experiment performed.