Blocks Never Change

Dropbox's Magic Pocket splits files into blocks of up to 4 MB, keys every block by the SHA-256 of its (compressed, encrypted) contents, and never modifies a block once written. The Block Index maps hash to cell, bucket and checksum. Buckets are grouped into volumes, and a volume is either open (accepting writes) or closed (immutable, and eventually erasure coded).

A user edits a 12 MB file, changing bytes in the middle. More than one option is correct. Which of these happen?

A

Blocks whose bytes did not change are not stored again, because the hash is the key and the index already has it.

B

The closed volume containing the old blocks is reopened so the new blocks can be appended to it.

C

The changed region is written as new blocks with new hashes; the previously stored blocks are untouched.

D

The Block Index gains entries for the new hashes, and the entries for superseded blocks stay until garbage collection removes them.

E

The OSDs holding the old blocks rewrite those blocks in place on every replica.