read-modify-write · shipping

Read-modify-write

A storage update that reads existing data needed to preserve unchanged information, combines it with replacement data, and writes the modified data and any required redundancy.

For a partial physical-sector update on a 512e drive, the merge is within a 4096-byte physical sector [5]. In parity RAID, RMW uses old changed-data blocks and old parity, rather than every unchanged block. A cold-cache one-block update has two reads and two writes for RAID5, or three and three for P+Q RAID6. These are member-block transfers, not fixed fractions of full-stripe throughput [3].

With u replacements and p parity blocks, cD coherently cached old changed-data blocks and cP old parity blocks reduce RMW reads to u+p-cD-cP; writes remain u+p [6]. Incoming replacement data is not an old-data cache hit. Linux v6.12 checks original-page validity and can force reconstruction when parity may be inconsistent even without a failed member [7].

Minimum preread count alone is not a recovery policy. Missing members, journals and partial-block writes need separate analysis. CPU atomic read-modify-write instructions are a different use of the name.

Relations

related
Advanced Format (4K), 512e emulation, 4Kn native sectors, Partition alignment, Solid-state drive (SSD), RAID 5, RAID 6, Parity RAID, RAID write hole, Write amplification, Reconstruct-write, Full-stripe write, Parity logging, Speculative partial write

Advantages

  • Updates part of stored data while preserving the untouched information
  • Can update parity without reading every unchanged data block

Limitations

  • Extra reads create dependencies, but counting operations alone does not determine elapsed time
  • A full-stripe update can avoid parity prereads but still writes redundancy and needs crash-consistency protection
  • Sector alignment, RAID stripe coverage and SSD-internal write amplification describe different layers

Citations

  1. Chen et al. (1994): RAID: High-Performance, Reliable Secondary Storage; sections 3.2.5-3.3.2 and 4.1.1 (accessed 2026-10-11)
  2. Seagate: Transition to Advanced Format 4K Sector Hard Drives, 512-byte emulation and alignment. (accessed 2026-10-11)
  3. Hesela: RAID write penalty is not a speed ratio; model and limitations (accessed 2026-10-11)
  4. Linux v6.12 drivers/md/raid5.c: uptodate_for_rmw() and handle_stripe_dirtying(), original-page validity, preread selection and recovery override. (accessed 2026-10-19)

Further reading

  1. Advanced Format (Wikipedia; 512e and read-modify-write sections) (accessed 2026-10-11)
  2. Standard RAID levels (Wikipedia; RAID 5 write amplification and performance sections) (accessed 2026-10-11)
  3. Linux kernel documentation: RAID 4/5/6 cache, write-back mode and implementation. Rolling documentation; accessed 11 October 2026. (accessed 2026-10-11)

JSON: /data/terms/read-modify-write.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Read-modify-write. Hesela. 2026-10-19. https://hesela.dev/terms/read-modify-write/