mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 04:07:45 +03:00
Illumos 4370, 4371
4370 avoid transmitting holes during zfs send 4371 DMU code clean up Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Approved by: Garrett D'Amore <garrett@damore.org>a References: https://www.illumos.org/issues/4370 https://www.illumos.org/issues/4371 https://github.com/illumos/illumos-gate/commit/43466aa Ported by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2529
This commit is contained in:
committed by
Brian Behlendorf
parent
fa86b5dbb6
commit
b0bc7a84d9
@@ -122,7 +122,9 @@ int
|
||||
dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx,
|
||||
boolean_t async)
|
||||
{
|
||||
int used, compressed, uncompressed;
|
||||
int used = bp_get_dsize_sync(tx->tx_pool->dp_spa, bp);
|
||||
int compressed = BP_GET_PSIZE(bp);
|
||||
int uncompressed = BP_GET_UCSIZE(bp);
|
||||
|
||||
if (BP_IS_HOLE(bp))
|
||||
return (0);
|
||||
@@ -130,11 +132,6 @@ dsl_dataset_block_kill(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx,
|
||||
ASSERT(dmu_tx_is_syncing(tx));
|
||||
ASSERT(bp->blk_birth <= tx->tx_txg);
|
||||
|
||||
used = bp_get_dsize_sync(tx->tx_pool->dp_spa, bp);
|
||||
compressed = BP_GET_PSIZE(bp);
|
||||
uncompressed = BP_GET_UCSIZE(bp);
|
||||
|
||||
ASSERT(used > 0);
|
||||
if (ds == NULL) {
|
||||
dsl_free(tx->tx_pool, tx->tx_txg, bp);
|
||||
dsl_pool_mos_diduse_space(tx->tx_pool,
|
||||
@@ -232,7 +229,8 @@ boolean_t
|
||||
dsl_dataset_block_freeable(dsl_dataset_t *ds, const blkptr_t *bp,
|
||||
uint64_t blk_birth)
|
||||
{
|
||||
if (blk_birth <= dsl_dataset_prev_snap_txg(ds))
|
||||
if (blk_birth <= dsl_dataset_prev_snap_txg(ds) ||
|
||||
(bp != NULL && BP_IS_HOLE(bp)))
|
||||
return (B_FALSE);
|
||||
|
||||
ddt_prefetch(dsl_dataset_get_spa(ds), bp);
|
||||
|
||||
Reference in New Issue
Block a user