ZLE compression: don't use BPE_PAYLOAD_SIZE

ZLE compressor needs additional bytes to process
d_len argument efficiently.
Don't use BPE_PAYLOAD_SIZE as d_len with it
before we rework zle compressor somehow.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes #9416
This commit is contained in:
George Melikov
2024-05-29 23:50:25 +03:00
committed by Brian Behlendorf
parent 522f2629c8
commit b32d48a625
3 changed files with 13 additions and 7 deletions
+2 -1
View File
@@ -10525,7 +10525,8 @@ l2arc_log_blk_commit(l2arc_dev_t *dev, zio_t *pio, l2arc_write_callback_t *cb)
/* try to compress the buffer, at least one sector to save */
psize = zio_compress_data(ZIO_COMPRESS_LZ4,
abd_buf->abd, &abd, sizeof (*lb),
zio_get_compression_max_size(dev->l2ad_vdev->vdev_ashift,
zio_get_compression_max_size(ZIO_COMPRESS_LZ4,
dev->l2ad_vdev->vdev_ashift,
dev->l2ad_vdev->vdev_ashift, sizeof (*lb)), 0);
/* a log block is never entirely zero */