Stefan Ring via illumos-zfs
2014-09-10 08:39:30 UTC
I am interested if it is guaranteed (modulo hash collision) that
contents transferred via send|receive are exact replicas of their
corresponding bits on the originating pool.
A zfs stream seems to be protected by checksums, but at which level? I
see two possibilities for creating/processing the stream:
Either that:
1. Read bytes from pool verifying existing checksums
2. Assemble stream and calculate new stream checksum
and on the receiving side:
3. Read stream and verify stream checksum
4. Write bytes to pool, calculating new checksums
Or:
1. Read blocks and existing checksums from pool
2. Assemble stream
on the receiving side:
3. take stream contents including checksums and write to pool
In the first case, there is a slight chance of corruption just after
reading the bytes as well as just before writing them to the pool.
So which one is it?
contents transferred via send|receive are exact replicas of their
corresponding bits on the originating pool.
A zfs stream seems to be protected by checksums, but at which level? I
see two possibilities for creating/processing the stream:
Either that:
1. Read bytes from pool verifying existing checksums
2. Assemble stream and calculate new stream checksum
and on the receiving side:
3. Read stream and verify stream checksum
4. Write bytes to pool, calculating new checksums
Or:
1. Read blocks and existing checksums from pool
2. Assemble stream
on the receiving side:
3. take stream contents including checksums and write to pool
In the first case, there is a slight chance of corruption just after
reading the bytes as well as just before writing them to the pool.
So which one is it?