HomeFreeBSD

MFC r226549,r226550,r226551,r226552,r226553,r226568
rS229760Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

MFC r226549,r226550,r226551,r226552,r226553,r226568

MFC r226549 (pjd):
Remove redundant size calculation.

MFC r226550 (pjd):
Initialize 'rc' properly before using it. This error could lead to infinite
loop when data reconstruction was needed.

MFC r226551 (pjd):
Don't mark vdev as healthy too soon, so we won't try to use invalid vdevs.

MFC r226552 (pjd):
Never pass NULL block pointer when reading. This is neither expected nor
handled by lower layers like vdev_raidz, which uses bp for checksum
verification. This bug could lead to NULL pointer reference and resets
during boot.

MFC r226553 (pjd):
Always pass data size for checksum verification function, as using
physical block size declared in bp may not always be what we want.
For example in case of gang block header physical block size declared
in bp is much larger than SPA_GANGBLOCKSIZE (512 bytes) and checksum
calculation failed. This bug could lead to accessing unallocated
memory and resets/failures during boot.

MFC r226568 (pjd) [1]:

  • Correctly read gang header from raidz.
  • Decompress assembled gang block data if compressed.
  • Verify checksum of a gang header.
  • Verify checksum of assembled gang block data.
  • Verify checksum of uber block.

Submitted by: avg [1]

Details

Provenance
mmAuthored on
Parents
rS229759: MFC: r228217
Branches
Unknown
Tags
Unknown

Event Timeline