HomeFreeBSD

Compressed receive with different ashift can result in incorrect PSIZE on disk

Description

Compressed receive with different ashift can result in incorrect PSIZE on disk

We round up the psize to the nearest multiple of the asize or to the
lsize, whichever is smaller. Once that's done, we allocate a new
buffer of the appropriate size, zero the tail, and copy the data
into it. This adds a small performance cost to these kinds of writes,
but fixes the bookkeeping problems.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Matthew Ahrens <matthew.ahrens@delphix.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #12522
Closes #8462

Details

Provenance
pcd_delphix.comAuthored on Sep 8 2021, 8:52 PM
Tony Hutter <hutter2@llnl.gov>Committed on Sep 14 2021, 10:42 PM
Parents
rG7bf68e980682: Linux 5.15 compat: standalone <linux/stdarg.h>
Branches
Unknown
Tags
Unknown