HomeFreeBSD

stand: zfs: handle holes at the tail end correctly

Description

stand: zfs: handle holes at the tail end correctly

This mirrors dmu_read_impl(), zeroing out the tail end of the buffer and
clipping the read to what's contained by the block that exists.

This fixes an issue that arose during the 13.1 release process; in
13.1-RC1 and later, setting up GELI+ZFS will result in a failure to
boot. The culprit is this, which causes us to fail to load geom_eli.ko
as there's a residual portion after the single datablk that should be
zeroed out.

PR: 263407
Reviewed by: tsoome
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D35019

Details

Provenance
kevansAuthored on Apr 21 2022, 7:57 PM
Reviewer
tsoome
Differential Revision
D35019: stand: zfs: handle holes at the tail end correctly
Parents
rG92e40a9b9241: busdma_bounce: Batch bounce page free operations when possible.
Branches
Unknown
Tags
Unknown