]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
stand: zfs: handle holes at the tail end correctly
authorKyle Evans <kevans@FreeBSD.org>
Thu, 21 Apr 2022 19:57:24 +0000 (14:57 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 24 Apr 2022 03:51:38 +0000 (22:51 -0500)
commit0c9c8a4c6459a8cd1b7290ae7dcd9452d3a4dbc1
treea7f84f8caa43fed99ab87e57615f0756a0a0d355
parent587dacce01b34e67c297d185bf245a7649ed3cf3
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

(cherry picked from commit 914dc91d12198352b7878a88d30e2a6373a936e1)
stand/libsa/zfs/zfsimpl.c