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
a727848e05
commit
b01a8cc2c0
|
@ -1593,6 +1593,7 @@ zil_lwb_write_issue(zilog_t *zilog, lwb_t *lwb)
|
||||||
wsz = P2ROUNDUP_TYPED(lwb->lwb_nused, ZIL_MIN_BLKSZ, uint64_t);
|
wsz = P2ROUNDUP_TYPED(lwb->lwb_nused, ZIL_MIN_BLKSZ, uint64_t);
|
||||||
ASSERT3U(wsz, <=, lwb->lwb_sz);
|
ASSERT3U(wsz, <=, lwb->lwb_sz);
|
||||||
zio_shrink(lwb->lwb_write_zio, wsz);
|
zio_shrink(lwb->lwb_write_zio, wsz);
|
||||||
|
wsz = lwb->lwb_write_zio->io_size;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
wsz = lwb->lwb_sz;
|
wsz = lwb->lwb_sz;
|
||||||
|
|
Loading…
Reference in New Issue