mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
zil: Don't expect zio_shrink() to succeed.
At least for RAIDZ zio_shrink() does not reduce zio size, but reduced wsz in that case likely results in writing uninitialized memory. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #14853
This commit is contained in:
parent
14ba8ab97d
commit
469019fb0b
@ -1866,6 +1866,7 @@ zil_lwb_write_issue(zilog_t *zilog, lwb_t *lwb)
|
||||
wsz = P2ROUNDUP_TYPED(lwb->lwb_nused, ZIL_MIN_BLKSZ, uint64_t);
|
||||
ASSERT3U(wsz, <=, lwb->lwb_sz);
|
||||
zio_shrink(lwb->lwb_write_zio, wsz);
|
||||
wsz = lwb->lwb_write_zio->io_size;
|
||||
|
||||
} else {
|
||||
wsz = lwb->lwb_sz;
|
||||
|
Loading…
Reference in New Issue
Block a user