mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Prefer embedded blocks to dedup
Since embedded blocks introduction 11 years ago, their writing was blocked if dedup is enabled. After searching through the modern code I see no reason for this restriction to exist. Same time embedded blocks are dramatically cheaper. Even regular write of so small blocks would likely be cheaper than deduplication, even if the last is successful, not mentioning otherwise. Reviewed-by: Allan Jude <allan@klarasystems.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #17113
This commit is contained in:
+1
-2
@@ -2005,8 +2005,7 @@ zio_write_compress(zio_t *zio)
|
||||
compress = ZIO_COMPRESS_OFF;
|
||||
if (cabd != NULL)
|
||||
abd_free(cabd);
|
||||
} else if (!zp->zp_dedup && !zp->zp_encrypt &&
|
||||
psize <= BPE_PAYLOAD_SIZE &&
|
||||
} else if (psize <= BPE_PAYLOAD_SIZE && !zp->zp_encrypt &&
|
||||
zp->zp_level == 0 && !DMU_OT_HAS_FILL(zp->zp_type) &&
|
||||
spa_feature_is_enabled(spa, SPA_FEATURE_EMBEDDED_DATA)) {
|
||||
void *cbuf = abd_borrow_buf_copy(cabd, lsize);
|
||||
|
||||
Reference in New Issue
Block a user