On 05.10.09 23:07, Miles Nordin wrote:
"re" == Richard Elling <richard.ell...@gmail.com> writes:
re> As I said before, if the checksum matches, then the data is
re> checked for sequence number = previous + 1, the blk_birth ==
re> 0, and the size is correct. Since this data lives inside the
re> block, it is unlikely that a collision would also result in a
re> valid block.
That's just a description of how the zil works, not an additional
layer of protection for user data in the ZIL beyond the checksum. The
point of all this is to avoid needing to write a synchronous commit
sector to mark the block valid. Instead, the block becomes valid once
it's entirely written. Yes, the checksum has an additional, critical,
use in the ZIL compared to its use in the bulk pool, but checking
these header fields for sanity does nothing to mitigate broken
fletcher2's weakness in detecting corruption of the user data stored
inside the zil records. It's completely orthogonal.
If anything, the additional use of broken fletcher2 in the ZIL is a
reason it's even more important to fix the checksum in the ZIL:
checksum mismatches occur in the ZIL even during normal operation,
even when the storage is not misbehaving, because sometimes blocks are
incompletely written. This is the normal case, not the exception,
because the ZIL is only read after unclean shutdown.
and AIUI you are saying fletcher2 is still the default for bulk pool
data, too? even on newly created pools with the latest code?
Here's essentially the fix:
http://src.opensolaris.org/source/diff/onnv/onnv-gate/usr/src/uts/common/fs/zfs/sys/zio.h?r2=%252Fonnv%252Fonnv-gate%252Fusr%252Fsrc%252Futs%252Fcommon%252Ffs%252Fzfs%252Fsys%252Fzio.h%409454%3A02e1ddcc9be7&r1=%252Fonnv%252Fonnv-gate%252Fusr%252Fsrc%252Futs%252Fcommon%252Ffs%252Fzfs%252Fsys%252Fzio.h%409443%3A2a96d8478e95
It changes setting of checksum=on to mean "fletcher4", so it is used by default
for all user data and metadata. Though you can still set it to "fletcher2"
explicitly.
victor
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss