doc/dev/bluestore.rst
U: Uncompressed write of a complete, new blob.
P: Uncompressed partial write to unused region of an existing blob.
W: WAL overwrite: commit intent to overwrite, then overwrite async. Must be chunk_size = MAX(block_size, csum_block_size) aligned.
N: Uncompressed partial write to a new blob. Initially sparsely utilized. Future writes will either be P or W.
R+W: Read partial chunk, then to WAL overwrite.
C: Compress data, write to new blob.
F: Fragment lextent space by writing small piece of data into a piecemeal blob (that collects random, noncontiguous bits of data we need to write).
X: WAL read/modify/write on a single block (like legacy bluestore). No checksum.
This very roughly maps the type of write onto what we do when we encounter a given blob. In practice it's a bit more complicated since there might be several blobs to consider (e.g., we might be able to W into one or P into another), but it should communicate a rough idea of strategy.
+--------------------------+--------+--------------+-------------+--------------+---------------+ | | raw | raw (cached) | csum (4 KB) | csum (16 KB) | comp (128 KB) | +--------------------------+--------+--------------+-------------+--------------+---------------+ | 128+ KB (over)write | U | U | U | U | C | +--------------------------+--------+--------------+-------------+--------------+---------------+ | 64 KB (over)write | U | U | U | U | U or C | +--------------------------+--------+--------------+-------------+--------------+---------------+ | 4 KB overwrite | W | P | W | P | W | P | R+W | P | N (F?) | +--------------------------+--------+--------------+-------------+--------------+---------------+ | 100 byte overwrite | R+W | P | W | P | R+W | P | R+W | P | N (F?) | +--------------------------+--------+--------------+-------------+--------------+---------------+ | 100 byte append | R+W | P | W | P | R+W | P | R+W | P | N (F?) | +--------------------------+--------+--------------+-------------+--------------+---------------+ +--------------------------+--------+--------------+-------------+--------------+---------------+ | 4 KB clone overwrite | P | N | P | N | P | N | P | N | N (F?) | +--------------------------+--------+--------------+-------------+--------------+---------------+ | 100 byte clone overwrite | P | N | P | N | P | N | P | N | N (F?) | +--------------------------+--------+--------------+-------------+--------------+---------------+